about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-19 16:48:07 +0800
committerGitHub <noreply@github.com>2024-12-19 16:48:07 +0800
commit47e42c8815233080bbe25868e1789fbd1b5cf890 (patch)
tree2dca25c8634c96fba22fc9650197aae7e518f4d3 /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent3227f35177a6a658226c7345c2fbee56e2fcab04 (diff)
parenta6cf662f937e302bb4cd0abf10d0a05843323a49 (diff)
downloadrust-47e42c8815233080bbe25868e1789fbd1b5cf890.tar.gz
rust-47e42c8815233080bbe25868e1789fbd1b5cf890.zip
Rollup merge of #133702 - RalfJung:single-variant, r=oli-obk
Variants::Single: do not use invalid VariantIdx for uninhabited enums

~~Stacked on top of https://github.com/rust-lang/rust/pull/133681, only the last commit is new.~~

Currently, `Variants::Single` for an empty enum contains a `VariantIdx` of 0; looking that up in the enum variant list will ICE. That's quite confusing. So let's fix that by adding a new `Variants::Empty` case for types that have 0 variants.

try-job: i686-msvc
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions