trait Trait { fn xyz() -> bool; } impl Trait for dyn Send + Sync { fn xyz() -> bool { false } } impl Trait for dyn Sync + Send { //~^ ERROR conflicting implementations fn xyz() -> bool { true } } trait Trait2 { fn uvw() -> bool; } impl Trait2 for dyn Send + Sync { fn uvw() -> bool { false } } impl Trait2 for dyn Sync + Send + Sync { //~^ ERROR conflicting implementations fn uvw() -> bool { true } } struct Foo(T); impl Foo { fn abc() -> bool { //~ ERROR duplicate definitions with name `abc` false } } impl Foo { fn abc() -> bool { true } } fn main() { assert_eq!(::xyz(), false); assert_eq!(::xyz(), true); assert_eq!(::uvw(), false); assert_eq!(::uvw(), true); assert_eq!(>::abc(), false); //~^ ERROR: multiple applicable items in scope assert_eq!(>::abc(), true); //~^ ERROR: multiple applicable items in scope }