Skip to content

Commit 28ac141

Browse files
committed
Update MIR tests with comment verbosity fix
1 parent bf1c024 commit 28ac141

File tree

131 files changed

+30
-3679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+30
-3679
lines changed

src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir

-12
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,11 @@ fn address_of_reborrow() -> () {
129129
StorageLive(_1); // scope 0 at $DIR/address-of.rs:4:9: 4:10
130130
StorageLive(_2); // scope 0 at $DIR/address-of.rs:4:14: 4:21
131131
_2 = [const 0_i32; 10]; // scope 0 at $DIR/address-of.rs:4:14: 4:21
132-
// ty::Const
133-
// + ty: i32
134-
// + val: Value(Scalar(0x00000000))
135-
// mir::Constant
136-
// + span: $DIR/address-of.rs:4:15: 4:16
137-
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
138132
_1 = &_2; // scope 0 at $DIR/address-of.rs:4:13: 4:21
139133
FakeRead(ForLet, _1); // scope 0 at $DIR/address-of.rs:4:9: 4:10
140134
StorageLive(_3); // scope 1 at $DIR/address-of.rs:5:9: 5:14
141135
StorageLive(_4); // scope 1 at $DIR/address-of.rs:5:22: 5:29
142136
_4 = [const 0_i32; 10]; // scope 1 at $DIR/address-of.rs:5:22: 5:29
143-
// ty::Const
144-
// + ty: i32
145-
// + val: Value(Scalar(0x00000000))
146-
// mir::Constant
147-
// + span: $DIR/address-of.rs:5:23: 5:24
148-
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
149137
_3 = &mut _4; // scope 1 at $DIR/address-of.rs:5:17: 5:29
150138
FakeRead(ForLet, _3); // scope 1 at $DIR/address-of.rs:5:9: 5:14
151139
StorageLive(_5); // scope 2 at $DIR/address-of.rs:7:5: 7:18

src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.32bit

-24
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,8 @@ fn main() -> () {
2626
bb0: {
2727
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
2828
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29
29-
// ty::Const
30-
// + ty: u32
31-
// + val: Value(Scalar(0x0000002a))
32-
// mir::Constant
33-
// + span: $DIR/array-index-is-temporary.rs:13:18: 13:20
34-
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
35-
// ty::Const
36-
// + ty: u32
37-
// + val: Value(Scalar(0x0000002b))
38-
// mir::Constant
39-
// + span: $DIR/array-index-is-temporary.rs:13:22: 13:24
40-
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002b)) }
41-
// ty::Const
42-
// + ty: u32
43-
// + val: Value(Scalar(0x0000002c))
44-
// mir::Constant
45-
// + span: $DIR/array-index-is-temporary.rs:13:26: 13:28
46-
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) }
4729
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
4830
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18
49-
// ty::Const
50-
// + ty: usize
51-
// + val: Value(Scalar(0x00000001))
52-
// mir::Constant
53-
// + span: $DIR/array-index-is-temporary.rs:14:17: 14:18
54-
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
5531
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
5632
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
5733
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31

src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir.64bit

-24
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,8 @@ fn main() -> () {
2626
bb0: {
2727
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
2828
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29
29-
// ty::Const
30-
// + ty: u32
31-
// + val: Value(Scalar(0x0000002a))
32-
// mir::Constant
33-
// + span: $DIR/array-index-is-temporary.rs:13:18: 13:20
34-
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
35-
// ty::Const
36-
// + ty: u32
37-
// + val: Value(Scalar(0x0000002b))
38-
// mir::Constant
39-
// + span: $DIR/array-index-is-temporary.rs:13:22: 13:24
40-
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002b)) }
41-
// ty::Const
42-
// + ty: u32
43-
// + val: Value(Scalar(0x0000002c))
44-
// mir::Constant
45-
// + span: $DIR/array-index-is-temporary.rs:13:26: 13:28
46-
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) }
4729
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
4830
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18
49-
// ty::Const
50-
// + ty: usize
51-
// + val: Value(Scalar(0x0000000000000001))
52-
// mir::Constant
53-
// + span: $DIR/array-index-is-temporary.rs:14:17: 14:18
54-
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
5531
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
5632
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
5733
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31

src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir

-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ fn main() -> () {
2828
bb0: {
2929
StorageLive(_1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17
3030
_1 = const false; // scope 0 at $DIR/basic_assignment.rs:11:20: 11:25
31-
// ty::Const
32-
// + ty: bool
33-
// + val: Value(Scalar(0x00))
34-
// mir::Constant
35-
// + span: $DIR/basic_assignment.rs:11:20: 11:25
36-
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
3731
FakeRead(ForLet, _1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17
3832
StorageLive(_2); // scope 1 at $DIR/basic_assignment.rs:12:9: 12:17
3933
StorageLive(_3); // scope 2 at $DIR/basic_assignment.rs:16:16: 16:24

src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir

-12
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@ fn main() -> () {
2222
// + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc0)) }
2323
StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:6:9: 6:10
2424
_2 = [const 5_u8, const 120_u8]; // scope 1 at $DIR/byte_slice.rs:6:13: 6:24
25-
// ty::Const
26-
// + ty: u8
27-
// + val: Value(Scalar(0x05))
28-
// mir::Constant
29-
// + span: $DIR/byte_slice.rs:6:14: 6:17
30-
// + literal: Const { ty: u8, val: Value(Scalar(0x05)) }
31-
// ty::Const
32-
// + ty: u8
33-
// + val: Value(Scalar(0x78))
34-
// mir::Constant
35-
// + span: $DIR/byte_slice.rs:6:19: 6:23
36-
// + literal: Const { ty: u8, val: Value(Scalar(0x78)) }
3725
_0 = const (); // scope 0 at $DIR/byte_slice.rs:4:11: 7:2
3826
// ty::Const
3927
// + ty: ()

src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.32bit

-24
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,8 @@
2929
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
3030
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
3131
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
32-
// ty::Const
33-
// + ty: usize
34-
// + val: Value(Scalar(0x00000000))
35-
// mir::Constant
36-
// + span: $DIR/combine_array_len.rs:5:15: 5:16
37-
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
3832
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
3933
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
40-
+ // ty::Const
41-
+ // + ty: usize
42-
+ // + val: Value(Scalar(0x00000002))
43-
+ // mir::Constant
44-
+ // + span: $DIR/combine_array_len.rs:5:13: 5:17
45-
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
4634
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
4735
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
4836
}
@@ -53,20 +41,8 @@
5341
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
5442
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
5543
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
56-
// ty::Const
57-
// + ty: usize
58-
// + val: Value(Scalar(0x00000001))
59-
// mir::Constant
60-
// + span: $DIR/combine_array_len.rs:6:15: 6:16
61-
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
6244
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
6345
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
64-
+ // ty::Const
65-
+ // + ty: usize
66-
+ // + val: Value(Scalar(0x00000002))
67-
+ // mir::Constant
68-
+ // + span: $DIR/combine_array_len.rs:6:13: 6:17
69-
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
7046
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
7147
assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
7248
}

src/test/mir-opt/combine_array_len.norm2.InstCombine.diff.64bit

-24
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,8 @@
2929
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
3030
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
3131
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
32-
// ty::Const
33-
// + ty: usize
34-
// + val: Value(Scalar(0x0000000000000000))
35-
// mir::Constant
36-
// + span: $DIR/combine_array_len.rs:5:15: 5:16
37-
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
3832
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
3933
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
40-
+ // ty::Const
41-
+ // + ty: usize
42-
+ // + val: Value(Scalar(0x0000000000000002))
43-
+ // mir::Constant
44-
+ // + span: $DIR/combine_array_len.rs:5:13: 5:17
45-
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
4634
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
4735
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
4836
}
@@ -53,20 +41,8 @@
5341
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
5442
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
5543
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
56-
// ty::Const
57-
// + ty: usize
58-
// + val: Value(Scalar(0x0000000000000001))
59-
// mir::Constant
60-
// + span: $DIR/combine_array_len.rs:6:15: 6:16
61-
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
6244
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
6345
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
64-
+ // ty::Const
65-
+ // + ty: usize
66-
+ // + val: Value(Scalar(0x0000000000000002))
67-
+ // mir::Constant
68-
+ // + span: $DIR/combine_array_len.rs:6:13: 6:17
69-
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
7046
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
7147
assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
7248
}

src/test/mir-opt/const_prop/aggregate.main.ConstProp.diff

-33
Original file line numberDiff line numberDiff line change
@@ -15,45 +15,12 @@
1515
StorageLive(_2); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
1616
StorageLive(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
1717
(_3.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
18-
// ty::Const
19-
// + ty: i32
20-
// + val: Value(Scalar(0x00000000))
21-
// mir::Constant
22-
// + span: $DIR/aggregate.rs:5:14: 5:15
23-
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
2418
(_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
25-
// ty::Const
26-
// + ty: i32
27-
// + val: Value(Scalar(0x00000001))
28-
// mir::Constant
29-
// + span: $DIR/aggregate.rs:5:17: 5:18
30-
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
3119
(_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
32-
// ty::Const
33-
// + ty: i32
34-
// + val: Value(Scalar(0x00000002))
35-
// mir::Constant
36-
// + span: $DIR/aggregate.rs:5:20: 5:21
37-
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
3820
- _2 = (_3.1: i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
3921
- _1 = Add(move _2, const 0_i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:28
4022
+ _2 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:24
41-
// ty::Const
42-
// + ty: i32
43-
- // + val: Value(Scalar(0x00000000))
44-
+ // + val: Value(Scalar(0x00000001))
45-
// mir::Constant
46-
- // + span: $DIR/aggregate.rs:5:27: 5:28
47-
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
48-
+ // + span: $DIR/aggregate.rs:5:13: 5:24
49-
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
5023
+ _1 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:28
51-
+ // ty::Const
52-
+ // + ty: i32
53-
+ // + val: Value(Scalar(0x00000001))
54-
+ // mir::Constant
55-
+ // + span: $DIR/aggregate.rs:5:13: 5:28
56-
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
5724
StorageDead(_2); // scope 0 at $DIR/aggregate.rs:5:27: 5:28
5825
StorageDead(_3); // scope 0 at $DIR/aggregate.rs:5:28: 5:29
5926
_0 = const (); // scope 0 at $DIR/aggregate.rs:4:11: 6:2

0 commit comments

Comments
 (0)