summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/lint-incoherent-auto-trait-objects.rs')
-rw-r--r--src/test/ui/lint/lint-incoherent-auto-trait-objects.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs
new file mode 100644
index 000000000..d53b51447
--- /dev/null
+++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.rs
@@ -0,0 +1,19 @@
+trait Foo {}
+
+impl Foo for dyn Send {}
+
+impl Foo for dyn Send + Send {}
+//~^ ERROR conflicting implementations
+//~| hard error
+
+impl Foo for dyn Send + Sync {}
+
+impl Foo for dyn Sync + Send {}
+//~^ ERROR conflicting implementations
+//~| hard error
+
+impl Foo for dyn Send + Sync + Send {}
+//~^ ERROR conflicting implementations
+//~| hard error
+
+fn main() {}