fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133) 2 --> $DIR/issue-53114-safety-checks.rs:23:13 3 | 4LL | let _ = &p.b; 5 | ^^^^ 6 | 7 = note: `#[warn(safe_packed_borrows)]` on by default 8 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 9 = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043> 10 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior 11 12error[E0133]: access to union field is unsafe and requires unsafe function or block 13 --> $DIR/issue-53114-safety-checks.rs:26:13 14 | 15LL | let _ = &u2.a; 16 | ^^^^^ access to union field 17 | 18 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 19 20warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133) 21 --> $DIR/issue-53114-safety-checks.rs:29:17 22 | 23LL | let (_,) = (&p.b,); 24 | ^^^^ 25 | 26 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 27 = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043> 28 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior 29 30error[E0133]: access to union field is unsafe and requires unsafe function or block 31 --> $DIR/issue-53114-safety-checks.rs:31:17 32 | 33LL | let (_,) = (u1.a,); 34 | ^^^^ access to union field 35 | 36 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 37 38error[E0133]: access to union field is unsafe and requires unsafe function or block 39 --> $DIR/issue-53114-safety-checks.rs:32:17 40 | 41LL | let (_,) = (&u2.a,); 42 | ^^^^^ access to union field 43 | 44 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 45 46warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133) 47 --> $DIR/issue-53114-safety-checks.rs:39:11 48 | 49LL | match &p.b { _ => { } } 50 | ^^^^ 51 | 52 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 53 = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043> 54 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior 55 56error[E0133]: access to union field is unsafe and requires unsafe function or block 57 --> $DIR/issue-53114-safety-checks.rs:41:11 58 | 59LL | match u1.a { _ => { } } 60 | ^^^^ access to union field 61 | 62 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 63 64error[E0133]: access to union field is unsafe and requires unsafe function or block 65 --> $DIR/issue-53114-safety-checks.rs:42:11 66 | 67LL | match &u2.a { _ => { } } 68 | ^^^^^ access to union field 69 | 70 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 71 72warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133) 73 --> $DIR/issue-53114-safety-checks.rs:45:12 74 | 75LL | match (&p.b,) { (_,) => { } } 76 | ^^^^ 77 | 78 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 79 = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043> 80 = note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior 81 82error[E0133]: access to union field is unsafe and requires unsafe function or block 83 --> $DIR/issue-53114-safety-checks.rs:47:12 84 | 85LL | match (u1.a,) { (_,) => { } } 86 | ^^^^ access to union field 87 | 88 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 89 90error[E0133]: access to union field is unsafe and requires unsafe function or block 91 --> $DIR/issue-53114-safety-checks.rs:48:12 92 | 93LL | match (&u2.a,) { (_,) => { } } 94 | ^^^^^ access to union field 95 | 96 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior 97 98error: aborting due to 7 previous errors; 4 warnings emitted 99 100For more information about this error, try `rustc --explain E0133`.