1 error[E0133]: access to union field is unsafe and requires unsafe function or block
2 --> $DIR/union-unsafe.rs:33:5
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-unsafe.rs:46:6
12 LL | *u3.a = T::default();
13 | ^^^^ access to union field
15 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
17 error[E0133]: access to union field is unsafe and requires unsafe function or block
18 --> $DIR/union-unsafe.rs:52:6
20 LL | *u3.a = T::default();
21 | ^^^^ access to union field
23 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
25 error[E0133]: access to union field is unsafe and requires unsafe function or block
26 --> $DIR/union-unsafe.rs:60:13
29 | ^^^^ access to union field
31 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
33 error[E0133]: access to union field is unsafe and requires unsafe function or block
34 --> $DIR/union-unsafe.rs:63:14
36 LL | let U1 { a } = u1;
37 | ^ access to union field
39 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
41 error[E0133]: access to union field is unsafe and requires unsafe function or block
42 --> $DIR/union-unsafe.rs:64:12
44 LL | if let U1 { a: 12 } = u1 {}
45 | ^^^^^^^^^^^^ access to union field
47 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
49 error[E0133]: access to union field is unsafe and requires unsafe function or block
50 --> $DIR/union-unsafe.rs:69:6
52 LL | *u2.a = String::from("new");
53 | ^^^^ access to union field
55 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
57 error[E0133]: access to union field is unsafe and requires unsafe function or block
58 --> $DIR/union-unsafe.rs:73:6
61 | ^^^^ access to union field
63 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
65 error[E0133]: access to union field is unsafe and requires unsafe function or block
66 --> $DIR/union-unsafe.rs:77:6
68 LL | *u3.a = String::from("new");
69 | ^^^^ access to union field
71 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
73 error: aborting due to 9 previous errors
75 For more information about this error, try `rustc --explain E0133`.