1 Something other than a type or an associated type was given.
3 Erroneous code example:
8 let _: <u8 as Rick>::Morty; // error!
19 let _: <u8 as Age>::Mythology; // error!
22 In both cases, we're declaring a variable (called `_`) and we're giving it a
23 type. However, `<u8 as Rick>::Morty` and `<u8 as Age>::Mythology` aren't types,
24 therefore the compiler throws an error.
26 `<u8 as Rick>::Morty` is an enum variant, you cannot use a variant as a type,
27 you have to use the enum directly:
35 `<u8 as Age>::Mythology` is a trait method, which is definitely not a type.
36 However, the `Age` trait provides an associated type `Empire` which can be
49 let _: <u8 as Age>::Empire; // ok!