summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/member-constraints-in-root-universe.rs
blob: 97c44305864477f38370516958f032f5dcc65f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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() {}