diff options
Diffstat (limited to 'tests/ui/traits/reservation-impl/coherence-conflict.rs')
-rw-r--r-- | tests/ui/traits/reservation-impl/coherence-conflict.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/traits/reservation-impl/coherence-conflict.rs b/tests/ui/traits/reservation-impl/coherence-conflict.rs new file mode 100644 index 000000000..fa4a30931 --- /dev/null +++ b/tests/ui/traits/reservation-impl/coherence-conflict.rs @@ -0,0 +1,14 @@ +// check that reservation impls are accounted for in negative reasoning. + +#![feature(rustc_attrs)] + +trait MyTrait {} +#[rustc_reservation_impl="this impl is reserved"] +impl MyTrait for () {} + +trait OtherTrait {} +impl OtherTrait for () {} +impl<T: MyTrait> OtherTrait for T {} +//~^ ERROR conflicting implementations + +fn main() {} |