]> git.proxmox.com Git - rustc.git/blob - src/test/ui/span/recursive-type-field.stderr
08e97e750c31aed45c8a5d2e1ebc390dbff8a561
[rustc.git] / src / test / ui / span / recursive-type-field.stderr
1 error[E0072]: recursive type `Foo` has infinite size
2 --> $DIR/recursive-type-field.rs:3:1
3 |
4 LL | struct Foo<'a> {
5 | ^^^^^^^^^^^^^^ recursive type has infinite size
6 LL | bar: Bar<'a>,
7 | ------- recursive without indirection
8 |
9 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Foo` representable
10 |
11 LL | bar: Box<Bar<'a>>,
12 | ++++ +
13
14 error[E0072]: recursive type `Bar` has infinite size
15 --> $DIR/recursive-type-field.rs:8:1
16 |
17 LL | struct Bar<'a> {
18 | ^^^^^^^^^^^^^^ recursive type has infinite size
19 LL | y: (Foo<'a>, Foo<'a>),
20 | ------------------ recursive without indirection
21 LL | z: Option<Bar<'a>>,
22 | --------------- recursive without indirection
23 ...
24 LL | d: [Bar<'a>; 1],
25 | ------------ recursive without indirection
26 LL | e: Foo<'a>,
27 | ------- recursive without indirection
28 LL | x: Bar<'a>,
29 | ------- recursive without indirection
30 |
31 = help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Bar` representable
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0072`.