We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a8eea8 commit 45dd5d6Copy full SHA for 45dd5d6
tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -1,14 +1,24 @@
1
-// skip-filecheck
2
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
3
// unit-test: ConstProp
4
5
// EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
6
fn main() {
+ // CHECK-LABEL: fn main(
7
+ // CHECK: debug a => [[a:_.*]];
8
+ // CHECK: debug x => [[x:_.*]];
9
+ // CHECK: debug y => [[y:_.*]];
10
+ // CHECK: debug z => [[z:_.*]];
11
+ // CHECK: [[a]] = foo()
12
+ // CHECK: [[x]] = const (1_i32, 2_i32);
13
+ // CHECK: [[tmp:_.*]] = [[a]];
14
+ // CHECK: ([[x]].1: i32) = move [[tmp]];
15
+ // CHECK: [[y]] = ([[x]].1: i32);
16
+ // CHECK: [[z]] = const 1_i32;
17
let a = foo();
18
let mut x: (i32, i32) = (1, 2);
19
x.1 = a;
20
let y = x.1;
- let z = x.0; // this could theoretically be allowed, but we can't handle it right now
21
+ let z = x.0;
22
}
23
24
#[inline(never)]
0 commit comments