|  | 
| 1 | 1 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 2 |  | -  --> $DIR/union-unsafe.rs:33:6 | 
|  | 2 | +  --> $DIR/union-unsafe.rs:34:6 | 
| 3 | 3 |    | | 
| 4 | 4 | LL |     *(u.p) = 13; | 
| 5 | 5 |    |      ^^^^^ access to union field | 
| 6 | 6 |    | | 
| 7 | 7 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 8 | 8 | 
 | 
| 9 | 9 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 10 |  | -  --> $DIR/union-unsafe.rs:46:6 | 
|  | 10 | +  --> $DIR/union-unsafe.rs:47:6 | 
| 11 | 11 |    | | 
| 12 | 12 | LL |     *u3.a = T::default(); | 
| 13 | 13 |    |      ^^^^ access to union field | 
| 14 | 14 |    | | 
| 15 | 15 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 16 | 16 | 
 | 
| 17 | 17 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 18 |  | -  --> $DIR/union-unsafe.rs:52:6 | 
|  | 18 | +  --> $DIR/union-unsafe.rs:53:6 | 
| 19 | 19 |    | | 
| 20 | 20 | LL |     *u3.a = T::default(); | 
| 21 | 21 |    |      ^^^^ access to union field | 
| 22 | 22 |    | | 
| 23 | 23 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 24 | 24 | 
 | 
| 25 | 25 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 26 |  | -  --> $DIR/union-unsafe.rs:60:13 | 
|  | 26 | +  --> $DIR/union-unsafe.rs:61:13 | 
| 27 | 27 |    | | 
| 28 | 28 | LL |     let a = u1.a; | 
| 29 | 29 |    |             ^^^^ access to union field | 
| 30 | 30 |    | | 
| 31 | 31 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 32 | 32 | 
 | 
| 33 | 33 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 34 |  | -  --> $DIR/union-unsafe.rs:63:14 | 
|  | 34 | +  --> $DIR/union-unsafe.rs:64:14 | 
| 35 | 35 |    | | 
| 36 | 36 | LL |     let U1 { a } = u1; | 
| 37 | 37 |    |              ^ access to union field | 
| 38 | 38 |    | | 
| 39 | 39 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 40 | 40 | 
 | 
| 41 | 41 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 42 |  | -  --> $DIR/union-unsafe.rs:64:8 | 
|  | 42 | +  --> $DIR/union-unsafe.rs:65:20 | 
| 43 | 43 |    | | 
| 44 | 44 | LL |     if let U1 { a: 12 } = u1 {} | 
| 45 |  | -   |        ^^^^^^^^^^^^^^^^^^^^^ access to union field | 
|  | 45 | +   |                    ^^ access to union field | 
| 46 | 46 |    | | 
| 47 | 47 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 48 | 48 | 
 | 
| 49 | 49 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 50 |  | -  --> $DIR/union-unsafe.rs:69:6 | 
|  | 50 | +  --> $DIR/union-unsafe.rs:66:25 | 
|  | 51 | +   | | 
|  | 52 | +LL |     if let Some(U1 { a: 13 }) = Some(u1) {} | 
|  | 53 | +   |                         ^^ access to union field | 
|  | 54 | +   | | 
|  | 55 | +   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
|  | 56 | + | 
|  | 57 | +error[E0133]: access to union field is unsafe and requires unsafe function or block | 
|  | 58 | +  --> $DIR/union-unsafe.rs:71:6 | 
| 51 | 59 |    | | 
| 52 | 60 | LL |     *u2.a = String::from("new"); | 
| 53 | 61 |    |      ^^^^ access to union field | 
| 54 | 62 |    | | 
| 55 | 63 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 56 | 64 | 
 | 
| 57 | 65 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 58 |  | -  --> $DIR/union-unsafe.rs:73:6 | 
|  | 66 | +  --> $DIR/union-unsafe.rs:75:6 | 
| 59 | 67 |    | | 
| 60 | 68 | LL |     *u3.a = 1; | 
| 61 | 69 |    |      ^^^^ access to union field | 
| 62 | 70 |    | | 
| 63 | 71 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 64 | 72 | 
 | 
| 65 | 73 | error[E0133]: access to union field is unsafe and requires unsafe function or block | 
| 66 |  | -  --> $DIR/union-unsafe.rs:77:6 | 
|  | 74 | +  --> $DIR/union-unsafe.rs:79:6 | 
| 67 | 75 |    | | 
| 68 | 76 | LL |     *u3.a = String::from("new"); | 
| 69 | 77 |    |      ^^^^ access to union field | 
| 70 | 78 |    | | 
| 71 | 79 |    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior | 
| 72 | 80 | 
 | 
| 73 |  | -error: aborting due to 9 previous errors | 
|  | 81 | +error: aborting due to 10 previous errors | 
| 74 | 82 | 
 | 
| 75 | 83 | For more information about this error, try `rustc --explain E0133`. | 
0 commit comments