rust/tests/mir-opt/const_prop/while_let_loops.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
314 B
Rust
Raw Normal View History

2023-09-20 21:43:33 +00:00
//@ unit-test: GVN
// EMIT_MIR while_let_loops.change_loop_body.GVN.diff
pub fn change_loop_body() {
2023-12-02 21:10:04 +00:00
// CHECK-LABEL: fn change_loop_body(
// CHECK: switchInt(const 0_isize)
let mut _x = 0;
while let Some(0u32) = None {
_x = 1;
break;
}
}
fn main() {
change_loop_body();
}