1 error[E0793]: reference to packed field is unaligned
2 --> $DIR/issue-27060.rs:15:13
4 LL | let _ = &good.data;
7 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
8 = 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)
10 error[E0793]: reference to packed field is unaligned
11 --> $DIR/issue-27060.rs:16:13
13 LL | let _ = &good.data2[0];
16 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
17 = 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)
19 error[E0793]: reference to packed field is unaligned
20 --> $DIR/issue-27060.rs:18:13
22 LL | let _ = &good.data;
25 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
26 = 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)
28 error[E0793]: reference to packed field is unaligned
29 --> $DIR/issue-27060.rs:19:13
31 LL | let _ = &good.data2[0];
34 = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
35 = 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)
37 error: aborting due to 4 previous errors
39 For more information about this error, try `rustc --explain E0793`.