1 An attempt was made to retrieve an associated type, but the type was ambiguous.
3 Erroneous code example:
6 trait Trait { type X; }
13 The problem here is that we're attempting to take the associated type of `X`
14 from `Trait`. Unfortunately, the type of `X` is not defined, because it's only
15 made concrete in implementations of the trait. A working version of this code
19 trait Trait { type X; }
22 impl Trait for Struct {
27 let foo: <Struct as Trait>::X;
31 This syntax specifies that we want the associated type `X` from `Struct`'s
32 implementation of `Trait`.
34 Due to internal limitations of the current compiler implementation we cannot
35 simply use `Struct::X`.