]> git.proxmox.com Git - rustc.git/blame - src/test/ui/structs-enums/struct-rec/mutual-struct-recursion.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / structs-enums / struct-rec / mutual-struct-recursion.stderr
CommitLineData
17df50a5
XL
1error[E0072]: recursive type `A` has infinite size
2 --> $DIR/mutual-struct-recursion.rs:1:1
3 |
4LL | struct A<T> {
5 | ^^^^^^^^^^^ recursive type has infinite size
6...
7LL | y: B<T>,
8 | ---- recursive without indirection
9 |
10help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `A` representable
11 |
12LL | y: Box<B<T>>,
94222f64 13 | ++++ +
17df50a5
XL
14
15error[E0072]: recursive type `B` has infinite size
16 --> $DIR/mutual-struct-recursion.rs:7:1
17 |
18LL | struct B<T> {
19 | ^^^^^^^^^^^ recursive type has infinite size
20LL |
21LL | z: A<T>
22 | ---- recursive without indirection
23 |
24help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `B` representable
25 |
26LL | z: Box<A<T>>
94222f64 27 | ++++ +
17df50a5
XL
28
29error[E0072]: recursive type `C` has infinite size
30 --> $DIR/mutual-struct-recursion.rs:12:1
31 |
32LL | struct C<T> {
33 | ^^^^^^^^^^^ recursive type has infinite size
34...
35LL | y: Option<Option<D<T>>>,
36 | -------------------- recursive without indirection
37 |
38help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `C` representable
39 |
40LL | y: Box<Option<Option<D<T>>>>,
94222f64 41 | ++++ +
17df50a5
XL
42
43error[E0072]: recursive type `D` has infinite size
44 --> $DIR/mutual-struct-recursion.rs:18:1
45 |
46LL | struct D<T> {
47 | ^^^^^^^^^^^ recursive type has infinite size
48LL |
49LL | z: Option<Option<C<T>>>,
50 | -------------------- recursive without indirection
51 |
52help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `D` representable
53 |
54LL | z: Box<Option<Option<C<T>>>>,
94222f64 55 | ++++ +
17df50a5
XL
56
57error: aborting due to 4 previous errors
58
59For more information about this error, try `rustc --explain E0072`.