rust/tests/ui/infinite/infinite-struct.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
766 B
Plaintext
Raw Normal View History

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
|
2022-08-15 14:11:11 -05:00
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
LL | struct Take(Box<Take>);
| ++++ +
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
2022-06-28 15:56:32 -05:00
For more information about this error, try `rustc --explain E0072`.