We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e169ab commit d91bb50Copy full SHA for d91bb50
tests/mir-opt/const_prop/mutable_variable_no_prop.rs
@@ -1,10 +1,17 @@
1
-// skip-filecheck
2
// unit-test: ConstProp
3
+// Verify that we do not propagate the contents of this mutable static.
4
static mut STATIC: u32 = 0x42424242;
5
6
// EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
7
fn main() {
8
+ // CHECK-LABEL: fn main(
9
+ // CHECK: debug x => [[x:_.*]];
10
+ // CHECK: debug y => [[y:_.*]];
11
+ // CHECK: [[x]] = const 42_u32;
12
+ // CHECK: [[tmp:_.*]] = (*{{_.*}});
13
+ // CHECK: [[x]] = move [[tmp]];
14
+ // CHECK: [[y]] = [[x]];
15
let mut x = 42;
16
unsafe {
17
x = STATIC;
0 commit comments