// 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 } fn main() {}