Open
Description
This type
#[repr(transparent)]
struct S(u8);
has a "preferred" alignment of 8, but u8
's "preferred" alignment is 1. I would expect such a transparent newtype to preserve "preferred" alignment.
Preferred alignment is not directly visible to Rust programs, it's an internal thing inside the compiler, so this is not a big deal -- but it is still surprising.
Cc @oli-obk @eddyb