1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#![feature(generic_associated_types)] trait Foo { type Output<T>; fn baz(); } enum Bar<T> { Simple {}, Generic(T), } impl Foo for u8 { type Output<T> = Bar<T>; fn baz() { Self::Output::Simple {}; //~ ERROR type annotations needed } } fn main() {}