1 error: unexpected keyword `Self` in generic parameters
2 --> $DIR/keyword-self-as-type-param.rs:3:12
4 LL | struct Foo<Self>(Self);
7 = note: you cannot use `Self` as a generic parameter because it is reserved for associated items
9 error: unexpected keyword `Self` in generic parameters
10 --> $DIR/keyword-self-as-type-param.rs:7:11
12 LL | trait Bar<Self> {}
15 = note: you cannot use `Self` as a generic parameter because it is reserved for associated items
17 error[E0072]: recursive type `Foo` has infinite size
18 --> $DIR/keyword-self-as-type-param.rs:3:1
20 LL | struct Foo<Self>(Self);
21 | ^^^^^^^^^^^^^^^^ ---- recursive without indirection
23 | recursive type has infinite size
25 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
27 LL | struct Foo<Self>(Box<Self>);
30 error: aborting due to 3 previous errors
32 For more information about this error, try `rustc --explain E0072`.