mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-21 14:22:26 +00:00
3f42bec539
https://rust-lang.github.io/unsafe-code-guidelines/layout/unions.html points out that > [...] the default layout of Rust unions is, in general, > unspecified. > > That is, there are no general guarantees about the offset of the > fields, whether all fields have the same offset, what the call ABI > of the union is, etc. This commit explicitly asks for `#[repr(C)]` layout to guarantee that both fields have the same offeset. |
||
---|---|---|
.. | ||
allocation.rs | ||
anybitpattern.rs | ||
checked.rs | ||
contiguous.rs | ||
internal.rs | ||
lib.rs | ||
must.rs | ||
no_uninit.rs | ||
offset_of.rs | ||
pod_in_option.rs | ||
pod.rs | ||
transparent.rs | ||
zeroable_in_option.rs | ||
zeroable.rs |