mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
32 lines
935 B
Plaintext
32 lines
935 B
Plaintext
error[E0072]: recursive type `Take` has infinite size
|
|
--> $DIR/infinite-struct.rs:1:1
|
|
|
|
|
LL | struct Take(Take);
|
|
| ^^^^^^^^^^^ ---- recursive without indirection
|
|
|
|
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
|
|
|
|
LL | struct Take(Box<Take>);
|
|
| ++++ +
|
|
|
|
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: reached the recursion limit finding the struct tail for `Take`
|
|
|
|
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0072`.
|