#[lang = "sized"] pub trait Sized {} struct Foo { a: A, } impl Foo { fn bar(self) -> isize { self.a } } impl Foo { fn bar(self) -> char { self.a } } impl Foo { fn bar(self) -> T { self.a } } // E0592 fn main() { let a = Foo { a: 123 }; a.bar(); // { dg-error "duplicate definitions with name .bar." "" { target *-*-* } .-1 } }