rust/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir

20 lines
293 B
Rust
Raw Normal View History

// MIR for `switch_bool` after built
fn switch_bool(_1: bool) -> u32 {
2023-06-06 08:47:00 -05:00
let mut _0: u32;
bb0: {
2023-06-06 08:47:00 -05:00
switchInt(_1) -> [1: bb1, 0: bb2, otherwise: bb2];
}
bb1: {
2023-06-06 08:47:00 -05:00
_0 = const 5_u32;
return;
}
bb2: {
2023-06-06 08:47:00 -05:00
_0 = const 10_u32;
return;
}
}