| error[E0072]: recursive type `A` has infinite size | |
| --> $DIR/recursive-struct-oncelock-issue-151226.rs:6:1 | |
| | | |
| LL | struct A<T>(std::sync::OnceLock<Self>); | |
| | ^^^^^^^^^^^ ------------------------- recursive without indirection | |
| | | |
| help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | |
| | | |
| LL | struct A<T>(Box<std::sync::OnceLock<Self>>); | |
| | ++++ + | |
| error: aborting due to 1 previous error | |
| For more information about this error, try `rustc --explain E0072`. |