]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-39970.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-39970.rs
1 trait Array<'a> {
2 type Element: 'a;
3 }
4
5 trait Visit {
6 fn visit() {}
7 }
8
9 impl<'a> Array<'a> for () {
10 type Element = &'a ();
11 }
12
13 impl Visit for () where
14 //(): for<'a> Array<'a, Element=&'a ()>, // No ICE
15 (): for<'a> Array<'a, Element=()>, // ICE
16 {}
17
18 fn main() {
19 <() as Visit>::visit();
20 //~^ ERROR type mismatch resolving `for<'a> <() as Array<'a>>::Element == ()`
21 }