]> git.lizzy.rs Git - rust.git/blob - tests/ui/type/type-recursive.stderr
Make `output_filenames` a real query
[rust.git] / tests / 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    | ^^^^^^^^^
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 break the cycle
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    | ^^^^^^^^^
20 LL |     inner: Option<T2>,
21    |                   -- recursive without indirection
22    |
23 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
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    | ^^^^^^^^^
33 LL |     inner: OptionT3,
34    |            -------- recursive without indirection
35    |
36 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
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 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
48    |
49 LL | struct T4(Option<Box<T4>>);
50    |                  ++++  +
51
52 error[E0072]: recursive type `T5` has infinite size
53   --> $DIR/type-recursive.rs:18:1
54    |
55 LL | enum T5 {
56    | ^^^^^^^
57 LL |     Variant(Option<T5>),
58    |                    -- recursive without indirection
59    |
60 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
61    |
62 LL |     Variant(Option<Box<T5>>),
63    |                    ++++  +
64
65 error[E0072]: recursive type `T6` has infinite size
66   --> $DIR/type-recursive.rs:22:1
67    |
68 LL | enum T6 {
69    | ^^^^^^^
70 LL |     Variant{ field: Option<T6> },
71    |                            -- recursive without indirection
72    |
73 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
74    |
75 LL |     Variant{ field: Option<Box<T6>> },
76    |                            ++++  +
77
78 error[E0072]: recursive type `T7` has infinite size
79   --> $DIR/type-recursive.rs:26:1
80    |
81 LL | struct T7 {
82    | ^^^^^^^^^
83 LL |     foo: std::cell::Cell<Option<T7>>,
84    |                                 -- recursive without indirection
85    |
86 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
87    |
88 LL |     foo: std::cell::Cell<Option<Box<T7>>>,
89    |                                 ++++  +
90
91 error: aborting due to 7 previous errors
92
93 For more information about this error, try `rustc --explain E0072`.