rust/compiler/rustc_const_eval/src
Matthias Krüger 6e87eb58ed
Rollup merge of #133681 - RalfJung:niches, r=wesleywiser
improve TagEncoding::Niche docs, sanity check, and UB checks

Turns out the `niche_variants` range can actually contain the `untagged_variant`. We should report this as UB in Miri, so this PR implements that.

Also rename `partially_check_layout` to `layout_sanity_check` for better consistency with how similar functions are called in other parts of the compiler.

Turns out my adjustments to the transmutation logic also fix https://github.com/rust-lang/rust/issues/126267.
2024-12-03 21:55:26 +01:00
..
check_consts Auto merge of #133321 - compiler-errors:const-checker, r=wesleywiser 2024-12-03 04:39:48 +00:00
const_eval Rollup merge of #133681 - RalfJung:niches, r=wesleywiser 2024-12-03 21:55:26 +01:00
interpret Rollup merge of #133681 - RalfJung:niches, r=wesleywiser 2024-12-03 21:55:26 +01:00
util InterpCx store TypingEnv instead of a ParamEnv 2024-11-19 21:36:23 +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