summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-39970.rs
blob: f51e3b522e1c57c4a9a3bfac1d61bfad8508dba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
trait Array<'a> {
    type Element: 'a;
}

trait Visit {
    fn visit() {}
}

impl<'a> Array<'a> for () {
    type Element = &'a ();
}

impl Visit for () where
    //(): for<'a> Array<'a, Element=&'a ()>, // No ICE
    (): for<'a> Array<'a, Element=()>, // ICE
{}

fn main() {
    <() as Visit>::visit();
    //~^ ERROR type mismatch resolving `for<'a> <() as Array<'a>>::Element == ()`
}