1 warning: reference to packed field is unaligned
2 --> $DIR/issue-53114-safety-checks.rs:23:13
7 = note: `#[warn(unaligned_references)]` 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 #82523 <https://github.com/rust-lang/rust/issues/82523>
10 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
12 warning: reference to packed field is unaligned
13 --> $DIR/issue-53114-safety-checks.rs:29:17
15 LL | let (_,) = (&p.b,);
18 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
20 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
22 warning: reference to packed field is unaligned
23 --> $DIR/issue-53114-safety-checks.rs:39:11
25 LL | match &p.b { _ => { } }
28 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
29 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
30 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
32 warning: reference to packed field is unaligned
33 --> $DIR/issue-53114-safety-checks.rs:45:12
35 LL | match (&p.b,) { (_,) => { } }
38 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
40 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
42 error[E0133]: access to union field is unsafe and requires unsafe function or block
43 --> $DIR/issue-53114-safety-checks.rs:26:13
46 | ^^^^^ access to union field
48 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
50 error[E0133]: access to union field is unsafe and requires unsafe function or block
51 --> $DIR/issue-53114-safety-checks.rs:31:17
53 LL | let (_,) = (u1.a,);
54 | ^^^^ access to union field
56 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
58 error[E0133]: access to union field is unsafe and requires unsafe function or block
59 --> $DIR/issue-53114-safety-checks.rs:32:17
61 LL | let (_,) = (&u2.a,);
62 | ^^^^^ access to union field
64 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
66 error[E0133]: access to union field is unsafe and requires unsafe function or block
67 --> $DIR/issue-53114-safety-checks.rs:41:11
69 LL | match u1.a { _ => { } }
70 | ^^^^ access to union field
72 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
74 error[E0133]: access to union field is unsafe and requires unsafe function or block
75 --> $DIR/issue-53114-safety-checks.rs:42:11
77 LL | match &u2.a { _ => { } }
78 | ^^^^^ access to union field
80 = note: the field may not be properly initialized: using uninitialized data will cause 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; 4 warnings emitted
100 For more information about this error, try `rustc --explain E0133`.