diff options
| author | Ralf Jung <post@ralfj.de> | 2024-12-01 13:12:43 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-12-18 11:00:21 +0100 |
| commit | 21de42bf8ddd0f39c766c7705990152302ae1f3b (patch) | |
| tree | fd27ee9da12fb8c8682f7aaddb4dc749cfa1bfe6 /compiler/stable_mir/src/abi.rs | |
| parent | 37e74596c0b59e81b9ac58657f92297ef4ccb7ef (diff) | |
| download | rust-21de42bf8ddd0f39c766c7705990152302ae1f3b.tar.gz rust-21de42bf8ddd0f39c766c7705990152302ae1f3b.zip | |
Variants::Single: do not use invalid VariantIdx for uninhabited enums
Diffstat (limited to 'compiler/stable_mir/src/abi.rs')
| -rw-r--r-- | compiler/stable_mir/src/abi.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/stable_mir/src/abi.rs b/compiler/stable_mir/src/abi.rs index 2ac30b5aff1..cf28a0c5885 100644 --- a/compiler/stable_mir/src/abi.rs +++ b/compiler/stable_mir/src/abi.rs @@ -181,6 +181,7 @@ impl FieldsShape { #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize)] pub enum VariantsShape { /// Single enum variants, structs/tuples, unions, and all non-ADTs. + // FIXME: needs to become `Option` like in the internal type. Single { index: VariantIdx }, /// Enum-likes with more than one inhabited variant: each variant comes with |
