blob: 40d3ae30a87c680811cdaad65b9969e1f56090d4 (
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 `<() as Array<'a>>::Element == ()`
}
|