1 An associated type binding was done outside of the type parameter declaration
4 Erroneous code example:
9 fn boo(&self) -> <Self as Foo>::A;
16 fn boo(&self) -> usize { 42 }
19 fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
20 // error: associated type bindings are not allowed here
23 To solve this error, please move the type bindings in the type parameter
28 # trait Foo { type A; }
29 fn baz<I: Foo<A=Bar>>(x: &<I as Foo>::A) {} // ok!
32 Or in the `where` clause:
36 # trait Foo { type A; }
37 fn baz<I>(x: &<I as Foo>::A) where I: Foo<A=Bar> {}