]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/min_specialization/repeated_projection_type.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / test / ui / specialization / min_specialization / repeated_projection_type.rs
1 // Test that projection bounds can't be specialized on.
2
3 #![feature(min_specialization)]
4
5 trait X {
6     fn f();
7 }
8 trait Id {
9     type This;
10 }
11 impl<T> Id for T {
12     type This = T;
13 }
14
15 impl<T: Id> X for T {
16     default fn f() {}
17 }
18
19 impl<I, V: Id<This = (I,)>> X for V {
20     //~^ ERROR cannot specialize on
21     fn f() {}
22 }
23
24 fn main() {}