Skip to content

Commit baa1312

Browse files
committed
Make some tests unit.
1 parent 9e540df commit baa1312

19 files changed

+79
-75
lines changed

tests/mir-opt/const_prop/mult_by_zero.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// unit-test
2-
// compile-flags: -O -Zmir-opt-level=4
1+
// unit-test: ConstProp
32

43
// EMIT_MIR mult_by_zero.test.ConstProp.diff
54
fn test(x : i32) -> i32 {

tests/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
let mut _2: i32; // in scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
88

99
bb0: {
10-
- _0 = Mul(_1, const 0_i32); // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
10+
StorageLive(_2); // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
11+
_2 = _1; // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
12+
- _0 = Mul(move _2, const 0_i32); // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
1113
+ _0 = const 0_i32; // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
14+
StorageDead(_2); // scope 0 at $DIR/mult_by_zero.rs:+1:7: +1:8
1215
return; // scope 0 at $DIR/mult_by_zero.rs:+2:2: +2:2
1316
}
1417
}

tests/mir-opt/const_prop/mutable_variable.main.ConstProp.diff

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
StorageLive(_2); // scope 1 at $DIR/mutable_variable.rs:+3:9: +3:10
2020
- _2 = _1; // scope 1 at $DIR/mutable_variable.rs:+3:13: +3:14
2121
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:+3:13: +3:14
22+
_0 = const (); // scope 0 at $DIR/mutable_variable.rs:+0:11: +4:2
2223
StorageDead(_2); // scope 1 at $DIR/mutable_variable.rs:+4:1: +4:2
2324
StorageDead(_1); // scope 0 at $DIR/mutable_variable.rs:+4:1: +4:2
2425
return; // scope 0 at $DIR/mutable_variable.rs:+4:2: +4:2

tests/mir-opt/const_prop/mutable_variable.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// unit-test
2-
// compile-flags: -O
1+
// unit-test: ConstProp
32

43
// EMIT_MIR mutable_variable.main.ConstProp.diff
54
fn main() {

tests/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff

+12-13
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,26 @@
33

44
fn main() -> () {
55
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_aggregate.rs:+0:11: +0:11
6-
let mut _3: i32; // in scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
7-
let mut _4: i32; // in scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
6+
let mut _1: (i32, i32); // in scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
87
scope 1 {
9-
debug x => (i32, i32){ .0 => _3, .1 => _4, }; // in scope 1 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
10-
let _1: i32; // in scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
11-
let _2: i32; // in scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
8+
debug x => _1; // in scope 1 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
9+
let _2: (i32, i32); // in scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
1210
scope 2 {
13-
debug y => (i32, i32){ .0 => _3, .1 => _2, }; // in scope 2 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
11+
debug y => _2; // in scope 2 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
1412
}
1513
}
1614

1715
bb0: {
18-
StorageLive(_4); // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
19-
_3 = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
20-
_4 = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
21-
_4 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:+2:5: +2:13
16+
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
17+
- _1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
18+
+ _1 = const (42_i32, 43_i32); // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
19+
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:+2:5: +2:13
2220
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
23-
- _2 = _4; // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
24-
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
21+
- _2 = _1; // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
22+
+ _2 = const (42_i32, 99_i32); // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
23+
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate.rs:+0:11: +4:2
2524
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
26-
StorageDead(_4); // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
25+
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
2726
return; // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:2: +4:2
2827
}
2928
}

tests/mir-opt/const_prop/mutable_variable_aggregate.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// unit-test
2-
// compile-flags: -O
1+
// unit-test: ConstProp
32

43
// EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
54
fn main() {

tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff

+4-7
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
let _2: &mut (i32, i32); // in scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:9: +2:10
1010
scope 2 {
1111
debug z => _2; // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:9: +2:10
12-
let _3: i32; // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
13-
let _4: i32; // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
12+
let _3: (i32, i32); // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
1413
scope 3 {
15-
debug y => (i32, i32){ .0 => _3, .1 => _4, }; // in scope 3 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
14+
debug y => _3; // in scope 3 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
1615
}
1716
}
1817
}
@@ -24,11 +23,9 @@
2423
_2 = &mut _1; // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:13: +2:19
2524
((*_2).1: i32) = const 99_i32; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+3:5: +3:13
2625
StorageLive(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
27-
StorageLive(_4); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
28-
_3 = (_1.0: i32); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:13: +4:14
29-
_4 = (_1.1: i32); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:13: +4:14
26+
_3 = _1; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:13: +4:14
27+
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+0:11: +5:2
3028
StorageDead(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
31-
StorageDead(_4); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
3229
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
3330
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
3431
return; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:2: +5:2

tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// unit-test
2-
// compile-flags: -O
1+
// unit-test: ConstProp
32

43
// EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
54
fn main() {

tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:9: +1:14
1717
_1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:29: +1:34
1818
// mir::Constant
19-
// + span: $DIR/mutable_variable_aggregate_partial_read.rs:7:29: 7:32
19+
// + span: $DIR/mutable_variable_aggregate_partial_read.rs:6:29: 6:32
2020
// + literal: Const { ty: fn() -> (i32, i32) {foo}, val: Value(<ZST>) }
2121
}
2222

@@ -26,6 +26,7 @@
2626
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:9: +4:10
2727
- _2 = (_1.1: i32); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:13: +4:16
2828
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:13: +4:16
29+
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+0:11: +5:2
2930
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:1: +5:2
3031
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:1: +5:2
3132
return; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:2: +5:2

tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// ignore-wasm32 compiled with panic=abort by default
2-
// unit-test
3-
// compile-flags: -O
2+
// unit-test: ConstProp
43

54
// EMIT_MIR mutable_variable_aggregate_partial_read.main.ConstProp.diff
65
fn main() {

tests/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff

+19-14
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,39 @@
44
fn main() -> () {
55
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_no_prop.rs:+0:11: +0:11
66
let mut _1: u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
7-
let mut _2: u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
8-
let mut _3: *mut u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
7+
let _2: (); // in scope 0 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
8+
let mut _3: u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
9+
let mut _4: *mut u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
910
scope 1 {
1011
debug x => _1; // in scope 1 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
11-
let _4: u32; // in scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
12+
let _5: u32; // in scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
1213
scope 2 {
1314
}
1415
scope 3 {
15-
debug y => _4; // in scope 3 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
16+
debug y => _5; // in scope 3 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
1617
}
1718
}
1819

1920
bb0: {
2021
StorageLive(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
2122
_1 = const 42_u32; // scope 0 at $DIR/mutable_variable_no_prop.rs:+1:17: +1:19
22-
StorageLive(_2); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
23+
StorageLive(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
2324
StorageLive(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
24-
_3 = const {alloc1: *mut u32}; // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
25+
StorageLive(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
26+
_4 = const {alloc1: *mut u32}; // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
2527
// mir::Constant
26-
// + span: $DIR/mutable_variable_no_prop.rs:10:13: 10:19
28+
// + span: $DIR/mutable_variable_no_prop.rs:9:13: 9:19
2729
// + literal: Const { ty: *mut u32, val: Value(Scalar(alloc1)) }
28-
_2 = (*_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
29-
_1 = move _2; // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:9: +3:19
30-
StorageDead(_2); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:18: +3:19
31-
StorageDead(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:19: +3:20
32-
StorageLive(_4); // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
33-
_4 = _1; // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:13: +5:14
34-
StorageDead(_4); // scope 1 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
30+
_3 = (*_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
31+
_1 = move _3; // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:9: +3:19
32+
StorageDead(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:18: +3:19
33+
StorageDead(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:19: +3:20
34+
_2 = const (); // scope 2 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
35+
StorageDead(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:+4:5: +4:6
36+
StorageLive(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
37+
_5 = _1; // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:13: +5:14
38+
_0 = const (); // scope 0 at $DIR/mutable_variable_no_prop.rs:+0:11: +6:2
39+
StorageDead(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
3540
StorageDead(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
3641
return; // scope 0 at $DIR/mutable_variable_no_prop.rs:+6:2: +6:2
3742
}

tests/mir-opt/const_prop/mutable_variable_no_prop.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// unit-test
2-
// compile-flags: -O
1+
// unit-test: ConstProp
32

43
static mut STATIC: u32 = 0x42424242;
54

tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff

+23-19
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
fn main() -> () {
55
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+0:11: +0:11
66
let _1: i32; // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
7-
let mut _2: i32; // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
7+
let mut _3: i32; // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
88
scope 1 {
99
debug a => _1; // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
10-
let mut _5: i32; // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
11-
let mut _6: i32; // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
10+
let mut _2: (i32, i32); // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
1211
scope 2 {
13-
debug x => (i32, i32){ .0 => _5, .1 => _6, }; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
14-
let _3: i32; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
12+
debug x => _2; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
13+
let _4: i32; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
1514
scope 3 {
16-
debug y => _3; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
17-
let _4: i32; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
15+
debug y => _4; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
16+
let _5: i32; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
1817
scope 4 {
1918
debug z => _5; // in scope 4 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
2019
}
@@ -26,22 +25,27 @@
2625
StorageLive(_1); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
2726
_1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:13: +1:18
2827
// mir::Constant
29-
// + span: $DIR/mutable_variable_unprop_assign.rs:7:13: 7:16
28+
// + span: $DIR/mutable_variable_unprop_assign.rs:6:13: 6:16
3029
// + literal: Const { ty: fn() -> i32 {foo}, val: Value(<ZST>) }
3130
}
3231

3332
bb1: {
34-
StorageLive(_6); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
35-
_5 = const 1_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
36-
_6 = const 2_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
37-
StorageLive(_2); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
38-
_2 = _1; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
39-
_6 = move _2; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:5: +3:12
40-
StorageDead(_2); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
41-
StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
42-
_3 = _6; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:13: +4:16
43-
StorageDead(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
44-
StorageDead(_6); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
33+
StorageLive(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
34+
- _2 = (const 1_i32, const 2_i32); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
35+
+ _2 = const (1_i32, 2_i32); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
36+
StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
37+
_3 = _1; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
38+
(_2.1: i32) = move _3; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:5: +3:12
39+
StorageDead(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
40+
StorageLive(_4); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
41+
_4 = (_2.1: i32); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:13: +4:16
42+
StorageLive(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
43+
- _5 = (_2.0: i32); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:13: +5:16
44+
+ _5 = const 1_i32; // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:13: +5:16
45+
_0 = const (); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+0:11: +6:2
46+
StorageDead(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
47+
StorageDead(_4); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
48+
StorageDead(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
4549
StorageDead(_1); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
4650
return; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+6:2: +6:2
4751
}

tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// ignore-wasm32 compiled with panic=abort by default
2-
// unit-test
3-
// compile-flags: -O
2+
// unit-test: ConstProp
43

54
// EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
65
fn main() {

0 commit comments

Comments
 (0)