]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/mutable_variable_no_prop.rs
Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyup
[rust.git] / src / test / mir-opt / const_prop / mutable_variable_no_prop.rs
1 // compile-flags: -O
2
3 static mut STATIC: u32 = 42;
4
5 // EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
6 fn main() {
7     let mut x = 42;
8     unsafe {
9         x = STATIC;
10     }
11     let y = x;
12 }