summaryrefslogtreecommitdiffstats
path: root/tests/ui/infinite/infinite-struct.stderr
blob: b6c72b1de4695a7f885aea7931393c633d38d3dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0072`.