trait Foo {} trait Bar {} trait Iterable { type Item; } struct Container> { //~^ ERROR `impl Trait` is not allowed in generics field: T } enum Enum> { //~^ ERROR `impl Trait` is not allowed in generics A(T), } union Union + Copy> { //~^ ERROR `impl Trait` is not allowed in generics x: T, } type Type> = T; //~^ ERROR `impl Trait` is not allowed in generics fn main() { }