// Test that you cannot define items with the same name in overlapping inherent // impl blocks. #![allow(unused)] struct Foo; impl Foo { fn id() {} //~ ERROR duplicate definitions } impl Foo { fn id() {} } struct Bar(T); impl Bar { fn bar(&self) {} //~ ERROR duplicate definitions } impl Bar { fn bar(&self) {} } struct Baz(T); impl Baz { fn baz(&self) {} //~ ERROR duplicate definitions } impl Baz> { fn baz(&self) {} } fn main() {}