diff options
Diffstat (limited to 'src/test/ui/coherence/coherence-overlap-with-regions.rs')
-rw-r--r-- | src/test/ui/coherence/coherence-overlap-with-regions.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/coherence/coherence-overlap-with-regions.rs b/src/test/ui/coherence/coherence-overlap-with-regions.rs new file mode 100644 index 000000000..32f01f418 --- /dev/null +++ b/src/test/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() {} |