1 // revisions: stock with_negative_coherence
2 //[with_negative_coherence] check-pass
4 #![feature(negative_impls)]
5 #![cfg_attr(with_negative_coherence, feature(with_negative_coherence))]
7 trait MyPredicate<'a> {}
9 impl<'a, T> !MyPredicate<'a> for &'a T where T: 'a {}
13 impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
14 impl<'a, T> MyTrait<'a> for &'a T {}
15 //[stock]~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_`