diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs new file mode 100644 index 000000000..5d8beb451 --- /dev/null +++ b/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs @@ -0,0 +1,14 @@ +#![feature(negative_impls)] +#![feature(with_negative_coherence)] + +struct Wrap<T>(T); + +trait Foo {} +impl<T: 'static> !Foo for Box<T> {} + +trait Bar {} +impl<T> Bar for T where T: Foo {} +impl<T> Bar for Box<T> {} +//~^ ERROR conflicting implementations of trait `Bar` for type `Box<_>` + +fn main() {} |