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