summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/member-constraints-in-root-universe.rs
blob: 16e95e94ce5d37cc813c5baa0c50fba0c0025b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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>(_: <fn(&u8, &u8) as Trait>::Ty) -> impl Sized {
    "hidden type is `&'?0 str` with '?0 member of ['static,]"
}

fn main() {}