fork/rust

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

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

master
1.3 KiB23 linesraw
1error[E0793]: reference to packed field is unaligned
2  --> $DIR/packed-struct-borrow-element.rs:24:15
3   |
4LL |     let brw = &foo.baz;
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/packed-struct-borrow-element.rs:28:15
13   |
14LL |     let brw = &foo.baz;
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: aborting due to 2 previous errors
22
23For more information about this error, try `rustc --explain E0793`.