#[derive(Default, PartialEq)] struct Foo { bar: Box<[T]>, } trait Bar { fn foo(&self) {} } impl Bar for Foo {} impl Foo { fn bar(&self) { self.foo(); //~^ ERROR the method } } struct Fin where T: Bar { bar: Box<[T]>, } impl Bar for Fin {} impl Fin { fn bar(&self) { self.foo(); //~^ ERROR the method } } fn main() {}