error[E0072]: recursive type `A` has infinite size --> $DIR/mutual-struct-recursion.rs:1:1 | LL | struct A { | ^^^^^^^^^^^ recursive type has infinite size ... LL | y: B, | ---- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `A` representable | LL | y: Box>, | ++++ + error[E0072]: recursive type `B` has infinite size --> $DIR/mutual-struct-recursion.rs:7:1 | LL | struct B { | ^^^^^^^^^^^ recursive type has infinite size LL | LL | z: A | ---- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `B` representable | LL | z: Box> | ++++ + error[E0072]: recursive type `C` has infinite size --> $DIR/mutual-struct-recursion.rs:12:1 | LL | struct C { | ^^^^^^^^^^^ recursive type has infinite size ... LL | y: Option>>, | -------------------- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `C` representable | LL | y: Option>>>, | ++++ + error[E0072]: recursive type `D` has infinite size --> $DIR/mutual-struct-recursion.rs:18:1 | LL | struct D { | ^^^^^^^^^^^ recursive type has infinite size LL | LL | z: Option>>, | -------------------- recursive without indirection | help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `D` representable | LL | z: Option>>>, | ++++ + error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0072`.