about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-with_negative_coherence.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/feature-gates/feature-gate-with_negative_coherence.rs')
-rw-r--r--tests/ui/feature-gates/feature-gate-with_negative_coherence.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/feature-gates/feature-gate-with_negative_coherence.rs b/tests/ui/feature-gates/feature-gate-with_negative_coherence.rs
new file mode 100644
index 00000000000..d1d0a6a90b8
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-with_negative_coherence.rs
@@ -0,0 +1,8 @@
+trait Foo { }
+
+impl<T: std::ops::DerefMut> Foo for T { }
+
+impl<T> Foo for &T { }
+//~^ ERROR conflicting implementations of trait `Foo` for type `&_` [E0119]
+
+fn main() { }