rust/compiler/rustc_const_eval/src
Matthias Krüger 62cad970e8
Rollup merge of #136235 - oli-obk:transmuty-pat-tys, r=RalfJung
Pretty print pattern type values with transmute if they don't satisfy their pattern

Instead of printing `0_u32 is 1..`, we now print the default fallback rendering that we also use for invalid bools, chars, ...: `{transmute(0x00000000): (u32) is 1..=}`.

These cases can occur in mir dumps when const prop propagates a constant across a safety check that would prevent the actually UB value from existing. That's fine though, as it's dead code and we always need to allow UB in dead code.

follow-up to https://github.com/rust-lang/rust/pull/136176

cc ``@compiler-errors`` ``@scottmcm``

r? ``@RalfJung`` because of the interpreter changes
2025-02-06 13:09:58 +01:00
..
check_consts Contracts core intrinsics. 2025-02-03 12:53:57 -08:00
const_eval Rollup merge of #136430 - FedericoBruzzone:follow-up-136180, r=oli-obk 2025-02-03 21:11:35 +01:00
interpret Contracts core intrinsics. 2025-02-03 12:53:57 -08:00
util Pretty print pattern type values with transmute if they don't satisfy their pattern 2025-02-05 14:56:41 +00:00
errors.rs Implement MIR const trait stability checks 2025-01-28 05:01:12 +00:00
lib.rs Pretty print pattern type values with transmute if they don't satisfy their pattern 2025-02-05 14:56:41 +00:00