You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust will insert copies, etc. for the padding bits, and when users write code like:
let foo = MaybeUninit::<Foo>::zeroed().assume_init();
those fields will be zeroed.
However, if we were to use
#[repr(align(4))]structFoo{pubfield:u16,}
instead, this would not be the case.
We don't have that many types using repr(align) and repr(packed) explicitly, so we should manually check those against the C headers, and verify that they only use these attributes when C does so as well.