rust/tests/mir-opt/building/enum_cast.offsetty.built.after.mir
Scott McMurray 01524abb05 MIR-build: No longer emit assumes in enum-as casting
This just uses the `valid_range` from the backend, so it's duplicating the range metadata that now we include on parameters and loads.
2025-07-24 10:18:37 -07:00

18 lines
352 B
Rust

// MIR for `offsetty` after built
fn offsetty(_1: NotStartingAtZero) -> u32 {
debug x => _1;
let mut _0: u32;
let _2: NotStartingAtZero;
let mut _3: isize;
bb0: {
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_0 = move _3 as u32 (IntToInt);
StorageDead(_2);
return;
}
}