diff options
Diffstat (limited to 'tests/ui/traits/new-solver/member-constraints-in-root-universe.rs')
-rw-r--r-- | tests/ui/traits/new-solver/member-constraints-in-root-universe.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs b/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs new file mode 100644 index 000000000..97c443058 --- /dev/null +++ b/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs @@ -0,0 +1,17 @@ +// compile-flags: -Ztrait-solver=next +// 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>(_: <fn(&u8, &u8) as Trait>::Ty) -> impl Sized { + "hidden type is `&'?0 str` with '?0 member of ['static,]" +} + +fn main() {} |