about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2022-03-16 14:59:03 -0300
committerSantiago Pastorino <spastorino@gmail.com>2022-03-16 14:59:03 -0300
commitc3797dcce68a0b8b51028f2b9c797d300bac94c1 (patch)
tree00b28e1166a120b9d9d128fa835d814eac818e7f
parent461e8078010433ff7de2db2aaae8a3cfb0847215 (diff)
downloadrust-c3797dcce68a0b8b51028f2b9c797d300bac94c1.tar.gz
rust-c3797dcce68a0b8b51028f2b9c797d300bac94c1.zip
Add double negative trait test case
-rw-r--r--src/test/ui/coherence/coherence-overlap-double-negative.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/coherence/coherence-overlap-double-negative.rs b/src/test/ui/coherence/coherence-overlap-double-negative.rs
new file mode 100644
index 00000000000..1ea0ddc7430
--- /dev/null
+++ b/src/test/ui/coherence/coherence-overlap-double-negative.rs
@@ -0,0 +1,12 @@
+// check-pass
+
+#![feature(negative_impls)]
+#![feature(with_negative_coherence)]
+
+trait A {}
+trait B: A {}
+
+impl !A for u32 {}
+impl !B for u32 {}
+
+fn main() {}