]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_prop/mutable_variable_no_prop.rs
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr
[rust.git] / tests / mir-opt / const_prop / mutable_variable_no_prop.rs
1 // unit-test
2 // compile-flags: -O
3
4 static mut STATIC: u32 = 0x42424242;
5
6 // EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
7 fn main() {
8     let mut x = 42;
9     unsafe {
10         x = STATIC;
11     }
12     let y = x;
13 }