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 } } fn main() { let a = Foo { a: 123 }; a.bar(); // { dg-error "multiple candidates found for method .bar." "" { target *-*-* } .-1 } // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 } }