File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
- // skip-filecheck
2
1
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
3
2
// unit-test: ConstProp
4
3
5
4
// EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
6
5
fn main ( ) {
6
+ // 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;
7
17
let a = foo ( ) ;
8
18
let mut x: ( i32 , i32 ) = ( 1 , 2 ) ;
9
19
x. 1 = a;
10
20
let y = x. 1 ;
11
- let z = x. 0 ; // this could theoretically be allowed, but we can't handle it right now
21
+ let z = x. 0 ;
12
22
}
13
23
14
24
#[ inline( never) ]
You can’t perform that action at this time.
0 commit comments