2021-05-06 15:44:28 -05:00
|
|
|
struct A<T> {
|
2022-08-15 14:11:11 -05:00
|
|
|
//~^ ERROR recursive types `A` and `B` have infinite size
|
2021-05-06 15:44:28 -05:00
|
|
|
x: T,
|
|
|
|
y: B<T>,
|
|
|
|
}
|
|
|
|
|
|
|
|
struct B<T> {
|
|
|
|
z: A<T>
|
|
|
|
}
|
|
|
|
|
|
|
|
struct C<T> {
|
2022-08-15 14:11:11 -05:00
|
|
|
//~^ ERROR recursive types `C` and `D` have infinite size
|
2021-05-06 15:44:28 -05:00
|
|
|
x: T,
|
|
|
|
y: Option<Option<D<T>>>,
|
|
|
|
}
|
|
|
|
|
|
|
|
struct D<T> {
|
|
|
|
z: Option<Option<C<T>>>,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|