]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-recursive.stderr
Auto merge of #99443 - jam1garner:mips-virt-feature, r=nagisa
[rust.git] / src / test / ui / type / type-recursive.stderr
1 error[E0072]: recursive type `T1` has infinite size
2   --> $DIR/type-recursive.rs:1:1
3    |
4 LL | struct T1 {
5    | ^^^^^^^^^ recursive type has infinite size
6 LL |     foo: isize,
7 LL |     foolish: T1,
8    |              -- recursive without indirection
9    |
10 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T1` representable
11    |
12 LL |     foolish: Box<T1>,
13    |              ++++  +
14
15 error[E0072]: recursive type `T2` has infinite size
16   --> $DIR/type-recursive.rs:6:1
17    |
18 LL | struct T2 {
19    | ^^^^^^^^^ recursive type has infinite size
20 LL |     inner: Option<T2>,
21    |            ---------- recursive without indirection
22    |
23 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T2` representable
24    |
25 LL |     inner: Option<Box<T2>>,
26    |                   ++++  +
27
28 error[E0072]: recursive type `T3` has infinite size
29   --> $DIR/type-recursive.rs:12:1
30    |
31 LL | struct T3 {
32    | ^^^^^^^^^ recursive type has infinite size
33 LL |     inner: OptionT3,
34    |            -------- recursive without indirection
35    |
36 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T3` representable
37    |
38 LL |     inner: Box<OptionT3>,
39    |            ++++        +
40
41 error[E0072]: recursive type `T4` has infinite size
42   --> $DIR/type-recursive.rs:16:1
43    |
44 LL | struct T4(Option<T4>);
45    | ^^^^^^^^^ ---------- recursive without indirection
46    | |
47    | recursive type has infinite size
48    |
49 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T4` representable
50    |
51 LL | struct T4(Option<Box<T4>>);
52    |                  ++++  +
53
54 error[E0072]: recursive type `T5` has infinite size
55   --> $DIR/type-recursive.rs:18:1
56    |
57 LL | enum T5 {
58    | ^^^^^^^ recursive type has infinite size
59 LL |     Variant(Option<T5>),
60    |             ---------- recursive without indirection
61    |
62 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T5` representable
63    |
64 LL |     Variant(Option<Box<T5>>),
65    |                    ++++  +
66
67 error[E0072]: recursive type `T6` has infinite size
68   --> $DIR/type-recursive.rs:22:1
69    |
70 LL | enum T6 {
71    | ^^^^^^^ recursive type has infinite size
72 LL |     Variant{ field: Option<T6> },
73    |                     ---------- recursive without indirection
74    |
75 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T6` representable
76    |
77 LL |     Variant{ field: Option<Box<T6>> },
78    |                            ++++  +
79
80 error[E0072]: recursive type `T7` has infinite size
81   --> $DIR/type-recursive.rs:26:1
82    |
83 LL | struct T7 {
84    | ^^^^^^^^^ recursive type has infinite size
85 LL |     foo: std::cell::Cell<Option<T7>>,
86    |          --------------------------- recursive without indirection
87    |
88 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `T7` representable
89    |
90 LL |     foo: Box<std::cell::Cell<Option<T7>>>,
91    |          ++++                           +
92
93 error: aborting due to 7 previous errors
94
95 For more information about this error, try `rustc --explain E0072`.