struct Foo(A, B); impl Foo { fn test(a: T) -> T { a } } impl Foo { fn test() -> f32 { // { dg-error "duplicate definitions with name test" } 123f32 } } fn main() {}