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