error[E0072]: recursive type `T1` has infinite size --> $DIR/type-recursive.rs:1:1 | LL | struct T1 { | ^^^^^^^^^ LL | foo: isize, LL | foolish: T1, | -- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | foolish: Box, | ++++ + error[E0072]: recursive type `T2` has infinite size --> $DIR/type-recursive.rs:6:1 | LL | struct T2 { | ^^^^^^^^^ LL | inner: Option, | -- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | inner: Option>, | ++++ + error[E0072]: recursive type `T3` has infinite size --> $DIR/type-recursive.rs:12:1 | LL | struct T3 { | ^^^^^^^^^ LL | inner: OptionT3, | -------- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | inner: Box, | ++++ + error[E0072]: recursive type `T4` has infinite size --> $DIR/type-recursive.rs:16:1 | LL | struct T4(Option); | ^^^^^^^^^ -- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | struct T4(Option>); | ++++ + error[E0072]: recursive type `T5` has infinite size --> $DIR/type-recursive.rs:18:1 | LL | enum T5 { | ^^^^^^^ LL | Variant(Option), | -- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | Variant(Option>), | ++++ + error[E0072]: recursive type `T6` has infinite size --> $DIR/type-recursive.rs:22:1 | LL | enum T6 { | ^^^^^^^ LL | Variant{ field: Option }, | -- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | Variant{ field: Option> }, | ++++ + error[E0072]: recursive type `T7` has infinite size --> $DIR/type-recursive.rs:26:1 | LL | struct T7 { | ^^^^^^^^^ LL | foo: std::cell::Cell>, | -- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL | foo: std::cell::Cell>>, | ++++ + error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0072`.