Disable dead variant removal for #[repr(C)] enums.

See https://github.com/rust-lang/unsafe-code-guidelines/issues/500.
This commit is contained in:
Goldstein
2024-03-25 20:44:58 +03:00
parent 1a851da73c
commit 71dfbeabc4
10 changed files with 1548 additions and 3 deletions

View File

@@ -1401,7 +1401,7 @@ pub enum Variants<FieldIdx: Idx, VariantIdx: Idx> {
/// Single enum variants, structs/tuples, unions, and all non-ADTs.
Single { index: VariantIdx },
/// Enum-likes with more than one inhabited variant: each variant comes with
/// Enum-likes with more than one variant: each variant comes with
/// a *discriminant* (usually the same as the variant index but the user can
/// assign explicit discriminant values). That discriminant is encoded
/// as a *tag* on the machine. The layout of each variant is