summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/while_let_loops.rs
blob: d6527552bb0453ffdc23fb63167d5f0e61e77dc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// unit-test: GVN
// EMIT_MIR while_let_loops.change_loop_body.GVN.diff

pub fn change_loop_body() {
    // 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();
}