mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
f0a0f8f7e8
Disable dead variant removal for `#[repr(C)]` enums. This prevents removing dead branches from a `#[repr(C)]` enum (they now get discriminants allocated as if they were inhabited). Implementation notes: ABI of something like ```rust #[repr(C)] enum Foo { Foo(!), } ``` is still `Uninhabited`, but its layout is now computed as if all the branches were inhabited. This seemed to me like a proper way to do it, especially given that ABI sanity check explicitly asserts that type-level uninhabitedness implies ABI uninhabitedness. This probably needs some sort of FCP (given that it changes `#[repr(C)]` layout, which is a stable guarantee), but I’m not sure how to call for one or which team is the most relevant. See https://github.com/rust-lang/unsafe-code-guidelines/issues/500. |
||
---|---|---|
.. | ||
auxiliary | ||
16-bit-repr-c-enum.rs | ||
align-with-extern-c-fn.rs | ||
aligned_enum_cast.rs | ||
attr-usage-repr.rs | ||
attr-usage-repr.stderr | ||
conflicting-repr-hints.rs | ||
conflicting-repr-hints.stderr | ||
explicit-rust-repr-conflicts.rs | ||
explicit-rust-repr-conflicts.stderr | ||
invalid_repr_list_help.rs | ||
invalid_repr_list_help.stderr | ||
issue-83505-repr-simd.rs | ||
issue-83505-repr-simd.stderr | ||
malformed-repr-hints.rs | ||
malformed-repr-hints.stderr | ||
repr_c_int_align.rs | ||
repr-align-assign.fixed | ||
repr-align-assign.rs | ||
repr-align-assign.stderr | ||
repr-align.rs | ||
repr-align.stderr | ||
repr-c-dead-variants.aarch64-unknown-linux-gnu.stderr | ||
repr-c-dead-variants.armebv7r-none-eabi.stderr | ||
repr-c-dead-variants.i686-pc-windows-msvc.stderr | ||
repr-c-dead-variants.rs | ||
repr-c-dead-variants.x86_64-unknown-linux-gnu.stderr | ||
repr-c-int-dead-variants.rs | ||
repr-c-int-dead-variants.stderr | ||
repr-disallow-on-variant.rs | ||
repr-disallow-on-variant.stderr | ||
repr-packed-contains-align.rs | ||
repr-packed-contains-align.stderr | ||
repr-transparent-issue-87496.rs | ||
repr-transparent-issue-87496.stderr | ||
repr-transparent-non-exhaustive.rs | ||
repr-transparent-non-exhaustive.stderr | ||
repr-transparent-other-items.rs | ||
repr-transparent-other-items.stderr | ||
repr-transparent-other-reprs.rs | ||
repr-transparent-other-reprs.stderr | ||
repr-transparent.rs | ||
repr-transparent.stderr | ||
repr.rs | ||
repr.stderr | ||
transparent-enum-too-many-variants.rs | ||
transparent-enum-too-many-variants.stderr |