summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
blob: e51c6223555d5344863f8eb68d170b15b0f990d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// unit-test: ConstProp

static mut STATIC: u32 = 0x42424242;

// EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
fn main() {
    let mut x = 42;
    unsafe {
        x = STATIC;
    }
    let y = x;
}