1 #![feature(specialization)]
2 #![feature(negative_impls)]
4 // Negative impl for u32 cannot "specialize" the base impl.
6 impl<T> MyTrait for T {}
7 impl !MyTrait for u32 {} //~ ERROR E0751
9 // The second impl specializes the first, no error.
11 impl<T> MyTrait2 for T {}
12 impl MyTrait2 for u32 {}