blob: dcf8e7a51f13d5d757120da8a83e0f608e251747 [file] [log] [blame] [edit]
error[E0793]: reference to field of packed struct is unaligned
--> $DIR/packed-struct-borrow-element-64bit.rs:13:15
|
LL | let brw = &foo.baz;
| ^^^^^^^^
|
= note: this struct is at most 4-byte aligned, but the type of this field may require higher alignment
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= 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)
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0793`.