fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.5 KiB43 linesraw
1error[E0793]: reference to packed field is unaligned
2  --> $DIR/issue-27060.rs:15:13
3   |
4LL |     let _ = &good.data;
5   |             ^^^^^^^^^^
6   |
7   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
8   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
9   = 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
11error[E0793]: reference to packed field is unaligned
12  --> $DIR/issue-27060.rs:16:13
13   |
14LL |     let _ = &good.data2[0];
15   |             ^^^^^^^^^^^^^^
16   |
17   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
18   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
19   = 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)
20
21error[E0793]: reference to packed field is unaligned
22  --> $DIR/issue-27060.rs:18:13
23   |
24LL |     let _ = &good.data;
25   |             ^^^^^^^^^^
26   |
27   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
28   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
29   = 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)
30
31error[E0793]: reference to packed field is unaligned
32  --> $DIR/issue-27060.rs:19:13
33   |
34LL |     let _ = &good.data2[0];
35   |             ^^^^^^^^^^^^^^
36   |
37   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
38   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
39   = 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)
40
41error: aborting due to 4 previous errors
42
43For more information about this error, try `rustc --explain E0793`.