]> git.proxmox.com Git - rustc.git/blob - src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / coherence / coherence-inherited-assoc-ty-cycle-err.rs
1 // Formerly this ICEd with the following message:
2 // Tried to project an inherited associated type during coherence checking,
3 // which is currently not supported.
4 //
5 // No we expect to run into a more user-friendly cycle error instead.
6 #![feature(specialization)]
7
8 trait Trait<T> { type Assoc; }
9 //~^ ERROR E0391
10
11 impl<T> Trait<T> for Vec<T> {
12 type Assoc = ();
13 }
14
15 impl Trait<u8> for Vec<u8> {}
16
17 impl<T> Trait<T> for String {
18 type Assoc = ();
19 }
20
21 impl Trait<<Vec<u8> as Trait<u8>>::Assoc> for String {}
22
23 fn main() {}