]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/issue-43037.rs
Rollup merge of #99474 - aDotInTheVoid:rustdoc-json-noinline-test-cleanup, r=CraftSpider
[rust.git] / src / test / ui / specialization / issue-43037.rs
1 #![feature(specialization)]
2 #![allow(incomplete_features)]
3
4 trait X {}
5 trait Y: X {}
6 trait Z {
7     type Assoc: Y;
8 }
9 struct A<T>(T);
10
11 impl<T> Y for T where T: X {}
12 impl<T: X> Z for A<T> {
13     type Assoc = T;
14 }
15
16 // this impl is invalid, but causes an ICE anyway
17 impl<T> From<<A<T> as Z>::Assoc> for T {}
18 //~^ ERROR type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
19
20 fn main() {}