diff options
Diffstat (limited to 'tests/ui/lint/lint-incoherent-auto-trait-objects.rs')
-rw-r--r-- | tests/ui/lint/lint-incoherent-auto-trait-objects.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/lint/lint-incoherent-auto-trait-objects.rs b/tests/ui/lint/lint-incoherent-auto-trait-objects.rs new file mode 100644 index 000000000..d53b51447 --- /dev/null +++ b/tests/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() {} |