2020-11-26 15:32:41 +00:00
|
|
|
error[E0072]: recursive type `Take` has infinite size
|
|
|
|
--> $DIR/infinite-struct.rs:1:1
|
|
|
|
|
|
|
|
|
LL | struct Take(Take);
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^^^^^^ ---- recursive without indirection
|
2020-11-26 15:32:41 +00:00
|
|
|
|
|
2022-08-15 19:11:11 +00:00
|
|
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
2020-11-26 15:32:41 +00:00
|
|
|
|
|
|
|
|
LL | struct Take(Box<Take>);
|
2021-06-22 02:07:19 +00:00
|
|
|
| ++++ +
|
2020-11-26 15:32:41 +00:00
|
|
|
|
2022-08-15 19:11:11 +00: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 15:32:41 +00:00
|
|
|
|
2022-06-28 20:56:32 +00:00
|
|
|
For more information about this error, try `rustc --explain E0072`.
|