1 error: reference to packed field is unaligned
2 --> $DIR/issue-53114-safety-checks.rs:23:13
7 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
9 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
10 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
11 = note: `#[deny(unaligned_references)]` on by default
13 error: reference to packed field is unaligned
14 --> $DIR/issue-53114-safety-checks.rs:29:17
16 LL | let (_,) = (&p.b,);
19 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
20 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
21 = 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 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
24 error: reference to packed field is unaligned
25 --> $DIR/issue-53114-safety-checks.rs:39:11
27 LL | match &p.b { _ => { } }
30 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
32 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
33 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
35 error: reference to packed field is unaligned
36 --> $DIR/issue-53114-safety-checks.rs:45:12
38 LL | match (&p.b,) { (_,) => { } }
41 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
42 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
43 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
44 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
46 error[E0133]: access to union field is unsafe and requires unsafe function or block
47 --> $DIR/issue-53114-safety-checks.rs:26:13
50 | ^^^^^ access to union field
52 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
54 error[E0133]: access to union field is unsafe and requires unsafe function or block
55 --> $DIR/issue-53114-safety-checks.rs:31:17
57 LL | let (_,) = (u1.a,);
58 | ^^^^ access to union field
60 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
62 error[E0133]: access to union field is unsafe and requires unsafe function or block
63 --> $DIR/issue-53114-safety-checks.rs:32:17
65 LL | let (_,) = (&u2.a,);
66 | ^^^^^ access to union field
68 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
70 error[E0133]: access to union field is unsafe and requires unsafe function or block
71 --> $DIR/issue-53114-safety-checks.rs:41:11
73 LL | match u1.a { _ => { } }
74 | ^^^^ access to union field
76 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
78 error[E0133]: access to union field is unsafe and requires unsafe function or block
79 --> $DIR/issue-53114-safety-checks.rs:42:11
81 LL | match &u2.a { _ => { } }
82 | ^^^^^ access to union field
84 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
86 error[E0133]: access to union field is unsafe and requires unsafe function or block
87 --> $DIR/issue-53114-safety-checks.rs:47:12
89 LL | match (u1.a,) { (_,) => { } }
90 | ^^^^ access to union field
92 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
94 error[E0133]: access to union field is unsafe and requires unsafe function or block
95 --> $DIR/issue-53114-safety-checks.rs:48:12
97 LL | match (&u2.a,) { (_,) => { } }
98 | ^^^^^ access to union field
100 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
102 error: aborting due to 11 previous errors
104 For more information about this error, try `rustc --explain E0133`.
105 Future incompatibility report: Future breakage diagnostic:
106 error: reference to packed field is unaligned
107 --> $DIR/issue-53114-safety-checks.rs:23:13
112 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
113 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
114 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
115 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
116 = note: `#[deny(unaligned_references)]` on by default
118 Future breakage diagnostic:
119 error: reference to packed field is unaligned
120 --> $DIR/issue-53114-safety-checks.rs:29:17
122 LL | let (_,) = (&p.b,);
125 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
126 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
127 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
128 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
129 = note: `#[deny(unaligned_references)]` on by default
131 Future breakage diagnostic:
132 error: reference to packed field is unaligned
133 --> $DIR/issue-53114-safety-checks.rs:39:11
135 LL | match &p.b { _ => { } }
138 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
139 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
140 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
141 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
142 = note: `#[deny(unaligned_references)]` on by default
144 Future breakage diagnostic:
145 error: reference to packed field is unaligned
146 --> $DIR/issue-53114-safety-checks.rs:45:12
148 LL | match (&p.b,) { (_,) => { } }
151 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
152 = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
153 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
154 = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
155 = note: `#[deny(unaligned_references)]` on by default