trait Identity { type Identity; } impl Identity for T { type Identity = T; } trait Trait { type Assoc: Identity; fn tokenize(&self) -> ::Identity; } impl Trait for () { type Assoc = DoesNotExist; //~^ ERROR cannot find type `DoesNotExist` in this scope fn tokenize(&self) -> ::Identity { unimplemented!() } } fn main() {}