1 error[E0072]: recursive type `T1` has infinite size
2 --> $DIR/type-recursive.rs:1:1
8 | -- recursive without indirection
10 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
12 LL | foolish: Box<T1>,
15 error[E0072]: recursive type `T2` has infinite size
16 --> $DIR/type-recursive.rs:6:1
20 LL | inner: Option<T2>,
21 | -- recursive without indirection
23 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
25 LL | inner: Option<Box<T2>>,
28 error[E0072]: recursive type `T3` has infinite size
29 --> $DIR/type-recursive.rs:12:1
34 | -------- recursive without indirection
36 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
38 LL | inner: Box<OptionT3>,
41 error[E0072]: recursive type `T4` has infinite size
42 --> $DIR/type-recursive.rs:16:1
44 LL | struct T4(Option<T4>);
45 | ^^^^^^^^^ -- recursive without indirection
47 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
49 LL | struct T4(Option<Box<T4>>);
52 error[E0072]: recursive type `T5` has infinite size
53 --> $DIR/type-recursive.rs:18:1
57 LL | Variant(Option<T5>),
58 | -- recursive without indirection
60 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
62 LL | Variant(Option<Box<T5>>),
65 error[E0072]: recursive type `T6` has infinite size
66 --> $DIR/type-recursive.rs:22:1
70 LL | Variant{ field: Option<T6> },
71 | -- recursive without indirection
73 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
75 LL | Variant{ field: Option<Box<T6>> },
78 error[E0072]: recursive type `T7` has infinite size
79 --> $DIR/type-recursive.rs:26:1
83 LL | foo: std::cell::Cell<Option<T7>>,
84 | -- recursive without indirection
86 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
88 LL | foo: std::cell::Cell<Option<Box<T7>>>,
91 error: aborting due to 7 previous errors
93 For more information about this error, try `rustc --explain E0072`.