fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
766 B27 linesraw
1error[E0072]: recursive type `Take` has infinite size
2  --> $DIR/infinite-struct.rs:1:1
3   |
4LL | struct Take(Take);
5   | ^^^^^^^^^^^ ---- recursive without indirection
6   |
7help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
8   |
9LL | struct Take(Box<Take>);
10   |             ++++    +
11
12error[E0072]: recursive type `Foo` has infinite size
13  --> $DIR/infinite-struct.rs:10:1
14   |
15LL | struct Foo {
16   | ^^^^^^^^^^
17LL |     x: Bar<Foo>,
18   |            --- recursive without indirection
19   |
20help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
21   |
22LL |     x: Bar<Box<Foo>>,
23   |            ++++   +
24
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0072`.