blob: 203d512e39812e6e671e7de48e3e6b1f80455b84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  | 
trait Identity {
    type Identity;
}
impl<T> Identity for T {
    type Identity = T;
}
trait Trait {
    type Assoc: Identity;
    fn tokenize(&self) -> <Self::Assoc as Identity>::Identity;
}
impl Trait for () {
    type Assoc = DoesNotExist;
    //~^ ERROR cannot find type `DoesNotExist` in this scope
    fn tokenize(&self) -> <Self::Assoc as Identity>::Identity {
        unimplemented!()
    }
}
fn main() {}
 
  |