diff options
Diffstat (limited to 'tests/ui/coherence/coherence-overlap-with-regions.rs')
| -rw-r--r-- | tests/ui/coherence/coherence-overlap-with-regions.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/coherence/coherence-overlap-with-regions.rs b/tests/ui/coherence/coherence-overlap-with-regions.rs new file mode 100644 index 00000000000..32f01f41801 --- /dev/null +++ b/tests/ui/coherence/coherence-overlap-with-regions.rs @@ -0,0 +1,16 @@ +// check-pass + +#![feature(negative_impls)] +#![feature(rustc_attrs)] +#![feature(with_negative_coherence)] + +#[rustc_strict_coherence] +trait Foo {} +impl<T> !Foo for &T where T: 'static {} + +#[rustc_strict_coherence] +trait Bar {} +impl<T: Foo> Bar for T {} +impl<T> Bar for &T where T: 'static {} + +fn main() {} |
