fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0072]: recursive types `A` and `B` have infinite size 2 --> $DIR/mutual-struct-recursion.rs:1:1 3 | 4LL | struct A<T> { 5 | ^^^^^^^^^^^ 6... 7LL | y: B<T>, 8 | ---- recursive without indirection 9... 10LL | struct B<T> { 11 | ^^^^^^^^^^^ 12LL | z: A<T> 13 | ---- recursive without indirection 14 | 15help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle 16 | 17LL ~ y: Box<B<T>>, 18LL | } 19LL | 20LL | struct B<T> { 21LL ~ z: Box<A<T>> 22 | 23 24error[E0072]: recursive types `C` and `D` have infinite size 25 --> $DIR/mutual-struct-recursion.rs:11:1 26 | 27LL | struct C<T> { 28 | ^^^^^^^^^^^ 29... 30LL | y: Option<Option<D<T>>>, 31 | ---- recursive without indirection 32... 33LL | struct D<T> { 34 | ^^^^^^^^^^^ 35LL | z: Option<Option<C<T>>>, 36 | ---- recursive without indirection 37 | 38help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle 39 | 40LL ~ y: Option<Option<Box<D<T>>>>, 41LL | } 42LL | 43LL | struct D<T> { 44LL ~ z: Option<Option<Box<C<T>>>>, 45 | 46 47error: aborting due to 2 previous errors 48 49For more information about this error, try `rustc --explain E0072`.