error: reference to packed field is unaligned --> $DIR/unaligned_references.rs:14:17 | LL | let _ = &good.data; | ^^^^^^^^^^ | note: the lint level is defined here --> $DIR/unaligned_references.rs:1:9 | LL | #![deny(unaligned_references)] | ^^^^^^^^^^^^^^^^^^^^ = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) error: reference to packed field is unaligned --> $DIR/unaligned_references.rs:15:17 | LL | let _ = &good.data as *const _; | ^^^^^^^^^^ | = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) error: reference to packed field is unaligned --> $DIR/unaligned_references.rs:16:27 | LL | let _: *const _ = &good.data; | ^^^^^^^^^^ | = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) error: reference to packed field is unaligned --> $DIR/unaligned_references.rs:17:17 | LL | let _ = &good.data2[0]; | ^^^^^^^^^^^^^^ | = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) error: aborting due to 4 previous errors