]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/issue-100191.rs
Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup
[rust.git] / src / test / ui / coherence / issue-100191.rs
1 #![crate_type = "lib"]
2 #![feature(specialization, with_negative_coherence)]
3 #![allow(incomplete_features)]
4
5 trait X {}
6 trait Y: X {}
7 trait Z {
8     type Assoc: Y;
9 }
10 struct A<T>(T);
11
12 impl<T> Y for T where T: X {}
13 impl<T: X> Z for A<T> {
14     type Assoc = T;
15 }
16
17 // this impl is invalid, but causes an ICE anyway
18 impl<T> From<<A<T> as Z>::Assoc> for T {}
19 //~^ ERROR type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
20
21 fn main() {}