From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- .../next-solver/member-constraints-in-root-universe.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/ui/traits/next-solver/member-constraints-in-root-universe.rs (limited to 'tests/ui/traits/next-solver/member-constraints-in-root-universe.rs') diff --git a/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs new file mode 100644 index 000000000..16e95e94c --- /dev/null +++ b/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs @@ -0,0 +1,17 @@ +// compile-flags: -Znext-solver +// check-pass + +trait Trait { + type Ty; +} + +impl Trait for for<'a> fn(&'a u8, &'a u8) { + type Ty = (); +} + +// argument is necessary to create universes before registering the hidden type. +fn test<'a>(_: ::Ty) -> impl Sized { + "hidden type is `&'?0 str` with '?0 member of ['static,]" +} + +fn main() {} -- cgit v1.2.3