1
Fork 0
rust/compiler/rustc_const_eval/src
许杰友 Jieyou Xu (Joe) 2a43ce03fb
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
2024-12-19 16:48:07 +08:00
..
check_consts Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
const_eval Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
interpret Rollup merge of #133702 - RalfJung:single-variant, r=oli-obk 2024-12-19 16:48:07 +08:00
util make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
errors.rs Deduplicate checking drop terminator 2024-11-22 16:54:41 +00:00
lib.rs report UB when the niche value refers to the untagged variant 2024-11-30 18:26:30 +01:00