bytemuck/src
Lukasz Anforowicz 3f42bec539
Force #[repr(C)] layout to guarantee same offset of union fields. (#268)
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.
2024-08-27 10:30:57 -06:00
..
allocation.rs Remove "dangling" terminology for zero-sized pointees. (#262) 2024-08-11 01:59:50 -06:00
anybitpattern.rs Fix the errors CI is showing (#247) 2024-05-28 12:22:59 -06:00
checked.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
contiguous.rs make clippy be quiet about useless nonsense. 2024-05-13 10:53:18 -06:00
internal.rs Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256) 2024-07-30 17:05:11 -06:00
lib.rs Force #[repr(C)] layout to guarantee same offset of union fields. (#268) 2024-08-27 10:30:57 -06:00
must.rs Make must_cast by-value and by-shared-ref functions const (#261) 2024-08-11 01:59:06 -06:00
no_uninit.rs run cargo fmt (#120) 2022-07-24 09:27:49 -06:00
offset_of.rs [Feature] extend TransparentWrapper conversion functions (#58) 2021-03-28 23:11:13 -06:00
pod_in_option.rs improve docs 2022-07-02 15:29:48 -06:00
pod.rs Support Zeroable and Pod for f16 and f128 (#251) 2024-06-18 21:24:29 -06:00
transparent.rs Update TransparentWrapper asserts (#232) 2024-04-09 19:02:38 -06:00
zeroable_in_option.rs improve documentation for optional features (#203) 2023-09-05 13:39:41 -06:00
zeroable.rs Support Zeroable and Pod for f16 and f128 (#251) 2024-06-18 21:24:29 -06:00