]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-inherited-assoc-ty-cycle-err.rs
Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14
[rust.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 //~^ WARN the feature `specialization` is incomplete
8
9 trait Trait<T> { type Assoc; }
10 //~^ ERROR E0391
11
12 impl<T> Trait<T> for Vec<T> {
13     type Assoc = ();
14 }
15
16 impl Trait<u8> for Vec<u8> {}
17
18 impl<T> Trait<T> for String {
19     type Assoc = ();
20 }
21
22 impl Trait<<Vec<u8> as Trait<u8>>::Assoc> for String {}
23
24 fn main() {}