2020-11-26 09:32:41 -06:00
|
|
|
error[E0072]: recursive type `Take` has infinite size
|
|
|
|
--> $DIR/infinite-struct.rs:1:1
|
|
|
|
|
|
|
|
|
LL | struct Take(Take);
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^ ---- recursive without indirection
|
2020-11-26 09:32:41 -06:00
|
|
|
|
|
2022-08-15 14:11:11 -05:00
|
|
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
2020-11-26 09:32:41 -06:00
|
|
|
|
|
|
|
|
LL | struct Take(Box<Take>);
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++ +
|
2020-11-26 09:32:41 -06:00
|
|
|
|
2022-08-15 14:11:11 -05:00
|
|
|
error[E0072]: recursive type `Foo` has infinite size
|
|
|
|
--> $DIR/infinite-struct.rs:10:1
|
|
|
|
|
|
|
|
|
LL | struct Foo {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
LL | x: Bar<Foo>,
|
|
|
|
| --- recursive without indirection
|
|
|
|
|
|
|
|
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
|
|
|
|
|
|
|
|
LL | x: Bar<Box<Foo>>,
|
|
|
|
| ++++ +
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2020-11-26 09:32:41 -06:00
|
|
|
|
2022-06-28 15:56:32 -05:00
|
|
|
For more information about this error, try `rustc --explain E0072`.
|