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 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
25 LL | struct Foo<Self>(Box<Self>);
28 error: aborting due to 3 previous errors
30 For more information about this error, try `rustc --explain E0072`.