// issue#143560 trait T { type Target; } trait Foo { fn foo() -> impl T>; fn foo() -> impl Sized; //~^ ERROR: the name `foo` is defined multiple times } trait Bar { fn foo() -> impl T>; fn foo() -> impl T>; //~^ ERROR: the name `foo` is defined multiple times } struct S { a: T } trait Baz { fn foo() -> S>>>; fn foo() -> S>>>; //~^ ERROR: the name `foo` is defined multiple times } struct S1 { a: T1, b: T2 } trait Qux { fn foo() -> S1< impl T>, impl T>> >; fn foo() -> S1< impl T>, impl T>> >; //~^^^^ ERROR: the name `foo` is defined multiple times } trait T0 { type Target; } trait T1 {} trait X { fn a() -> impl T0<(), Target = impl T1<()>>; fn a() -> impl T0<(), Target = impl T1<()>>; //~^ ERROR the name `a` is defined multiple times fn a() -> impl T0<(), Target = impl T1<()>>; //~^ ERROR the name `a` is defined multiple times } fn main() {}