1 error[E0133]: access to union field is unsafe and requires unsafe function or block
2 --> $DIR/union.rs:30:20
4 LL | Foo { bar: _a } => {},
5 | ^^ access to union field
7 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
9 error[E0133]: access to union field is unsafe and requires unsafe function or block
10 --> $DIR/union.rs:34:20
13 | ____________________^
14 LL | | topping: Some(PizzaTopping::Cheese) | Some(PizzaTopping::Pineapple) | None
16 | |_____________^ access to union field
18 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
20 error[E0133]: access to union field is unsafe and requires unsafe function or block
21 --> $DIR/union.rs:42:20
23 LL | Foo { zst: () } => {},
24 | ^^ access to union field
26 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
28 error[E0133]: access to union field is unsafe and requires unsafe function or block
29 --> $DIR/union.rs:45:22
31 LL | Foo { pizza: Pizza { .. } } => {},
32 | ^^^^^^^^^^^^ access to union field
34 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
36 error: aborting due to 4 previous errors
38 For more information about this error, try `rustc --explain E0133`.