2018-08-08 12:28:26 +00:00
|
|
|
error[E0072]: recursive type `U` has infinite size
|
2022-06-30 02:33:18 +00:00
|
|
|
--> $DIR/union-nonrepresentable.rs:2:1
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | union U {
|
2018-08-08 12:28:26 +00:00
|
|
|
| ^^^^^^^ recursive type has infinite size
|
|
|
|
LL | a: u8,
|
2022-06-30 02:33:18 +00:00
|
|
|
LL | b: std::mem::ManuallyDrop<U>,
|
|
|
|
| ------------------------- recursive without indirection
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2020-05-31 02:58:49 +00:00
|
|
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `U` representable
|
2020-05-29 16:24:59 +00:00
|
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
LL | b: Box<std::mem::ManuallyDrop<U>>,
|
|
|
|
| ++++ +
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0072`.
|