9 struct Container<T: Iterable<Item = impl Foo>> {
10 //~^ ERROR `impl Trait` only allowed in function and inherent method return types
14 enum Enum<T: Iterable<Item = impl Foo>> {
15 //~^ ERROR `impl Trait` only allowed in function and inherent method return types
19 union Union<T: Iterable<Item = impl Foo> + Copy> {
20 //~^ ERROR `impl Trait` only allowed in function and inherent method return types
24 type Type<T: Iterable<Item = impl Foo>> = T;
25 //~^ ERROR `impl Trait` only allowed in function and inherent method return types