trait Foo { type Bar; fn foo(self) -> Self::Bar; } impl Foo for Box { //~^ ERROR: the value of the associated type `Bar` in `Foo` must be specified type Bar = ::Bar; fn foo(self) -> ::Bar { (*self).foo() } } fn main() {}