1 warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
2 --> $DIR/issue-53114-safety-checks.rs:23:13
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
12 error[E0133]: access to union field is unsafe and requires unsafe function or block
13 --> $DIR/issue-53114-safety-checks.rs:26:13
16 | ^^^^^ access to union field
18 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
20 warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
21 --> $DIR/issue-53114-safety-checks.rs:29:17
23 LL | let (_,) = (&p.b,);
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
30 error[E0133]: access to union field is unsafe and requires unsafe function or block
31 --> $DIR/issue-53114-safety-checks.rs:31:17
33 LL | let (_,) = (u1.a,);
34 | ^^^^ access to union field
36 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
38 error[E0133]: access to union field is unsafe and requires unsafe function or block
39 --> $DIR/issue-53114-safety-checks.rs:32:17
41 LL | let (_,) = (&u2.a,);
42 | ^^^^^ access to union field
44 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
46 warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
47 --> $DIR/issue-53114-safety-checks.rs:39:11
49 LL | match &p.b { _ => { } }
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
56 error[E0133]: access to union field is unsafe and requires unsafe function or block
57 --> $DIR/issue-53114-safety-checks.rs:41:11
59 LL | match u1.a { _ => { } }
60 | ^^^^ access to union field
62 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
64 error[E0133]: access to union field is unsafe and requires unsafe function or block
65 --> $DIR/issue-53114-safety-checks.rs:42:11
67 LL | match &u2.a { _ => { } }
68 | ^^^^^ access to union field
70 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
72 warning: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
73 --> $DIR/issue-53114-safety-checks.rs:45:12
75 LL | match (&p.b,) { (_,) => { } }
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
82 error[E0133]: access to union field is unsafe and requires unsafe function or block
83 --> $DIR/issue-53114-safety-checks.rs:47:12
85 LL | match (u1.a,) { (_,) => { } }
86 | ^^^^ access to union field
88 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
90 error[E0133]: access to union field is unsafe and requires unsafe function or block
91 --> $DIR/issue-53114-safety-checks.rs:48:12
93 LL | match (&u2.a,) { (_,) => { } }
94 | ^^^^^ access to union field
96 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
98 error: aborting due to 7 previous errors
100 For more information about this error, try `rustc --explain E0133`.