summaryrefslogtreecommitdiffstats
path: root/src/test/ui/coherence/coherence-overlap-super-negative.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/coherence/coherence-overlap-super-negative.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/coherence/coherence-overlap-super-negative.rs b/src/test/ui/coherence/coherence-overlap-super-negative.rs
new file mode 100644
index 000000000..d296a094a
--- /dev/null
+++ b/src/test/ui/coherence/coherence-overlap-super-negative.rs
@@ -0,0 +1,18 @@
+// check-pass
+
+#![feature(negative_impls)]
+#![feature(rustc_attrs)]
+#![feature(with_negative_coherence)]
+
+trait Trait1: Trait2 {}
+trait Trait2 {}
+
+struct MyType {}
+impl !Trait2 for MyType {}
+
+#[rustc_strict_coherence]
+trait Foo {}
+impl<T: Trait1> Foo for T {}
+impl Foo for MyType {}
+
+fn main() {}