1 error[E0072]: recursive type `T1` has infinite size
2 --> $DIR/type-recursive.rs:1:1
5 | ^^^^^^^^^ recursive type has infinite size
8 | -- recursive without indirection
10 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T1` representable
12 LL | foolish: Box<T1>,
15 error[E0072]: recursive type `T2` has infinite size
16 --> $DIR/type-recursive.rs:6:1
19 | ^^^^^^^^^ recursive type has infinite size
20 LL | inner: Option<T2>,
21 | ---------- recursive without indirection
23 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T2` representable
25 LL | inner: Option<Box<T2>>,
28 error[E0072]: recursive type `T3` has infinite size
29 --> $DIR/type-recursive.rs:12:1
32 | ^^^^^^^^^ recursive type has infinite size
34 | -------- recursive without indirection
36 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T3` representable
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 | recursive type has infinite size
49 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T4` representable
51 LL | struct T4(Option<Box<T4>>);
54 error[E0072]: recursive type `T5` has infinite size
55 --> $DIR/type-recursive.rs:18:1
58 | ^^^^^^^ recursive type has infinite size
59 LL | Variant(Option<T5>),
60 | ---------- recursive without indirection
62 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T5` representable
64 LL | Variant(Option<Box<T5>>),
67 error[E0072]: recursive type `T6` has infinite size
68 --> $DIR/type-recursive.rs:22:1
71 | ^^^^^^^ recursive type has infinite size
72 LL | Variant{ field: Option<T6> },
73 | ---------- recursive without indirection
75 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T6` representable
77 LL | Variant{ field: Option<Box<T6>> },
80 error[E0072]: recursive type `T7` has infinite size
81 --> $DIR/type-recursive.rs:26:1
84 | ^^^^^^^^^ recursive type has infinite size
85 LL | foo: std::cell::Cell<Option<T7>>,
86 | --------------------------- recursive without indirection
88 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T7` representable
90 LL | foo: Box<std::cell::Cell<Option<T7>>>,
93 error: aborting due to 7 previous errors
95 For more information about this error, try `rustc --explain E0072`.