]> git.lizzy.rs Git - rust.git/blob - src/test/ui/infinite/infinite-struct.stderr
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / infinite / infinite-struct.stderr
1 error[E0072]: recursive type `Take` has infinite size
2   --> $DIR/infinite-struct.rs:1:1
3    |
4 LL | struct Take(Take);
5    | ^^^^^^^^^^^ ---- recursive without indirection
6    |
7 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
8    |
9 LL | struct Take(Box<Take>);
10    |             ++++    +
11
12 error[E0072]: recursive type `Foo` has infinite size
13   --> $DIR/infinite-struct.rs:10:1
14    |
15 LL | struct Foo {
16    | ^^^^^^^^^^
17 LL |     x: Bar<Foo>,
18    |            --- recursive without indirection
19    |
20 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
21    |
22 LL |     x: Bar<Box<Foo>>,
23    |            ++++   +
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0072`.