Skip to content

Commit c7526fe

Browse files
committed
update ref test
1 parent 0749721 commit c7526fe

File tree

1 file changed

+72
-71
lines changed

1 file changed

+72
-71
lines changed

src/test/mir-opt/nll/region-subtyping-basic/32bit/rustc.main.nll.0.mir

+72-71
Original file line numberDiff line numberDiff line change
@@ -7,164 +7,165 @@
77
| Inferred Region Values
88
| '_#0r | U0 | {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5], '_#0r, '_#1r}
99
| '_#1r | U0 | {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5], '_#1r}
10-
| '_#2r | U0 | {bb2[0..=8], bb3[0], bb5[0..=2]}
11-
| '_#3r | U0 | {bb2[1..=8], bb3[0], bb5[0..=2]}
12-
| '_#4r | U0 | {bb2[4..=8], bb3[0], bb5[0..=2]}
10+
| '_#2r | U0 | {}
11+
| '_#3r | U0 | {bb2[0..=8], bb3[0], bb5[0..=2]}
12+
| '_#4r | U0 | {bb2[1..=8], bb3[0], bb5[0..=2]}
13+
| '_#5r | U0 | {bb2[4..=8], bb3[0], bb5[0..=2]}
1314
|
1415
| Inference Constraints
1516
| '_#0r live at {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5]}
1617
| '_#1r live at {bb0[0..=8], bb1[0], bb2[0..=8], bb3[0], bb4[0..=1], bb5[0..=3], bb6[0..=3], bb7[0..=2], bb8[0..=5]}
17-
| '_#2r live at {bb2[0]}
18-
| '_#3r live at {bb2[1..=3]}
19-
| '_#4r live at {bb2[4..=8], bb3[0], bb5[0..=2]}
20-
| '_#2r: '_#3r due to Assignment at Single(bb2[0])
21-
| '_#3r: '_#4r due to Assignment at Single(bb2[3])
18+
| '_#3r live at {bb2[0]}
19+
| '_#4r live at {bb2[1..=3]}
20+
| '_#5r live at {bb2[4..=8], bb3[0], bb5[0..=2]}
21+
| '_#3r: '_#4r due to Assignment at Single(bb2[0])
22+
| '_#4r: '_#5r due to Assignment at Single(bb2[3])
2223
|
2324
fn main() -> () {
24-
let mut _0: (); // return place in scope 0 at $DIR/region-subtyping-basic.rs:14:11: 14:11
25-
let mut _1: [usize; Const { ty: usize, val: Value(Scalar(0x00000003)) }]; // in scope 0 at $DIR/region-subtyping-basic.rs:15:9: 15:14
26-
let _3: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:16:16: 16:17
27-
let mut _4: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:16:14: 16:18
28-
let mut _5: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:16:14: 16:18
29-
let mut _7: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:18:8: 18:12
30-
let _8: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:19:9: 19:18
31-
let mut _9: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:19:15: 19:17
32-
let _10: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:21:9: 21:18
25+
let mut _0: (); // return place in scope 0 at $DIR/region-subtyping-basic.rs:16:11: 16:11
26+
let mut _1: [usize; Const { ty: usize, val: Value(Scalar(0x00000003)) }]; // in scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
27+
let _3: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:18:16: 18:17
28+
let mut _4: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18
29+
let mut _5: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18
30+
let mut _7: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:20:8: 20:12
31+
let _8: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:21:9: 21:18
32+
let mut _9: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:21:15: 21:17
33+
let _10: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:23:9: 23:18
3334
scope 1 {
34-
debug v => _1; // in scope 1 at $DIR/region-subtyping-basic.rs:15:9: 15:14
35-
let _2: &'_#3r usize; // in scope 1 at $DIR/region-subtyping-basic.rs:16:9: 16:10
35+
debug v => _1; // in scope 1 at $DIR/region-subtyping-basic.rs:17:9: 17:14
36+
let _2: &'_#4r usize; // in scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
3637
scope 2 {
37-
debug p => _2; // in scope 2 at $DIR/region-subtyping-basic.rs:16:9: 16:10
38-
let _6: &'_#4r usize; // in scope 2 at $DIR/region-subtyping-basic.rs:17:9: 17:10
38+
debug p => _2; // in scope 2 at $DIR/region-subtyping-basic.rs:18:9: 18:10
39+
let _6: &'_#5r usize; // in scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
3940
scope 3 {
40-
debug q => _6; // in scope 3 at $DIR/region-subtyping-basic.rs:17:9: 17:10
41+
debug q => _6; // in scope 3 at $DIR/region-subtyping-basic.rs:19:9: 19:10
4142
}
4243
}
4344
}
4445

4546
bb0: {
46-
StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:15:9: 15:14
47-
_1 = [const Const(Value(Scalar(0x00000001)): usize), const Const(Value(Scalar(0x00000002)): usize), const Const(Value(Scalar(0x00000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:15:17: 15:26
47+
StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
48+
_1 = [const Const(Value(Scalar(0x00000001)): usize), const Const(Value(Scalar(0x00000002)): usize), const Const(Value(Scalar(0x00000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26
4849
// ty::Const
4950
// + ty: usize
5051
// + val: Value(Scalar(0x00000001))
5152
// mir::Constant
52-
// + span: $DIR/region-subtyping-basic.rs:15:18: 15:19
53+
// + span: $DIR/region-subtyping-basic.rs:17:18: 17:19
5354
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
5455
// ty::Const
5556
// + ty: usize
5657
// + val: Value(Scalar(0x00000002))
5758
// mir::Constant
58-
// + span: $DIR/region-subtyping-basic.rs:15:21: 15:22
59+
// + span: $DIR/region-subtyping-basic.rs:17:21: 17:22
5960
// + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
6061
// ty::Const
6162
// + ty: usize
6263
// + val: Value(Scalar(0x00000003))
6364
// mir::Constant
64-
// + span: $DIR/region-subtyping-basic.rs:15:24: 15:25
65+
// + span: $DIR/region-subtyping-basic.rs:17:24: 17:25
6566
// + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
66-
FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:15:9: 15:14
67-
StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:16:9: 16:10
68-
StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:16:16: 16:17
69-
_3 = const Const(Value(Scalar(0x00000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:16:16: 16:17
67+
FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
68+
StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
69+
StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
70+
_3 = const Const(Value(Scalar(0x00000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
7071
// ty::Const
7172
// + ty: usize
7273
// + val: Value(Scalar(0x00000000))
7374
// mir::Constant
74-
// + span: $DIR/region-subtyping-basic.rs:16:16: 16:17
75+
// + span: $DIR/region-subtyping-basic.rs:18:16: 18:17
7576
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
76-
_4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:16:14: 16:18
77-
_5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:16:14: 16:18
78-
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> [success: bb2, unwind: bb1]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:16:14: 16:18
77+
_4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
78+
_5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
79+
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> [success: bb2, unwind: bb1]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
7980
}
8081

8182
bb1 (cleanup): {
82-
resume; // bb1[0]: scope 0 at $DIR/region-subtyping-basic.rs:14:1: 23:2
83+
resume; // bb1[0]: scope 0 at $DIR/region-subtyping-basic.rs:16:1: 25:2
8384
}
8485

8586
bb2: {
86-
_2 = &'_#2r _1[_3]; // bb2[0]: scope 1 at $DIR/region-subtyping-basic.rs:16:13: 16:18
87-
FakeRead(ForLet, _2); // bb2[1]: scope 1 at $DIR/region-subtyping-basic.rs:16:9: 16:10
88-
StorageLive(_6); // bb2[2]: scope 2 at $DIR/region-subtyping-basic.rs:17:9: 17:10
89-
_6 = _2; // bb2[3]: scope 2 at $DIR/region-subtyping-basic.rs:17:13: 17:14
90-
FakeRead(ForLet, _6); // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:17:9: 17:10
91-
StorageLive(_7); // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:18:8: 18:12
92-
_7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:18:8: 18:12
87+
_2 = &'_#3r _1[_3]; // bb2[0]: scope 1 at $DIR/region-subtyping-basic.rs:18:13: 18:18
88+
FakeRead(ForLet, _2); // bb2[1]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
89+
StorageLive(_6); // bb2[2]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
90+
_6 = _2; // bb2[3]: scope 2 at $DIR/region-subtyping-basic.rs:19:13: 19:14
91+
FakeRead(ForLet, _6); // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
92+
StorageLive(_7); // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
93+
_7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
9394
// ty::Const
9495
// + ty: bool
9596
// + val: Value(Scalar(0x01))
9697
// mir::Constant
97-
// + span: $DIR/region-subtyping-basic.rs:18:8: 18:12
98+
// + span: $DIR/region-subtyping-basic.rs:20:8: 20:12
9899
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
99-
FakeRead(ForMatchedPlace, _7); // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:18:8: 18:12
100-
switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
100+
FakeRead(ForMatchedPlace, _7); // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
101+
switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
101102
}
102103

103104
bb3: {
104-
falseEdges -> [real: bb5, imaginary: bb4]; // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
105+
falseEdges -> [real: bb5, imaginary: bb4]; // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
105106
}
106107

107108
bb4: {
108-
StorageLive(_10); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
109-
_10 = const Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(const Const(Value(Scalar(0x00000016)): usize)) -> [return: bb7, unwind: bb1]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
109+
StorageLive(_10); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
110+
_10 = const Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(const Const(Value(Scalar(0x00000016)): usize)) -> [return: bb7, unwind: bb1]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
110111
// ty::Const
111112
// + ty: fn(usize) -> bool {use_x}
112113
// + val: Value(Scalar(<ZST>))
113114
// mir::Constant
114-
// + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
115+
// + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
115116
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
116117
// ty::Const
117118
// + ty: usize
118119
// + val: Value(Scalar(0x00000016))
119120
// mir::Constant
120-
// + span: $DIR/region-subtyping-basic.rs:21:15: 21:17
121+
// + span: $DIR/region-subtyping-basic.rs:23:15: 23:17
121122
// + literal: Const { ty: usize, val: Value(Scalar(0x00000016)) }
122123
}
123124

124125
bb5: {
125-
StorageLive(_8); // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:19:9: 19:18
126-
StorageLive(_9); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:19:15: 19:17
127-
_9 = (*_6); // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:19:15: 19:17
128-
_8 = const Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(move _9) -> [return: bb6, unwind: bb1]; // bb5[3]: scope 3 at $DIR/region-subtyping-basic.rs:19:9: 19:18
126+
StorageLive(_8); // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
127+
StorageLive(_9); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
128+
_9 = (*_6); // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
129+
_8 = const Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(move _9) -> [return: bb6, unwind: bb1]; // bb5[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
129130
// ty::Const
130131
// + ty: fn(usize) -> bool {use_x}
131132
// + val: Value(Scalar(<ZST>))
132133
// mir::Constant
133-
// + span: $DIR/region-subtyping-basic.rs:19:9: 19:14
134+
// + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
134135
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
135136
}
136137

137138
bb6: {
138-
StorageDead(_9); // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:19:17: 19:18
139-
StorageDead(_8); // bb6[1]: scope 3 at $DIR/region-subtyping-basic.rs:19:18: 19:19
140-
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb6[2]: scope 3 at $DIR/region-subtyping-basic.rs:18:13: 20:6
139+
StorageDead(_9); // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18
140+
StorageDead(_8); // bb6[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
141+
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb6[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6
141142
// ty::Const
142143
// + ty: ()
143144
// + val: Value(Scalar(<ZST>))
144145
// mir::Constant
145-
// + span: $DIR/region-subtyping-basic.rs:18:13: 20:6
146+
// + span: $DIR/region-subtyping-basic.rs:20:13: 22:6
146147
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
147-
goto -> bb8; // bb6[3]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
148+
goto -> bb8; // bb6[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
148149
}
149150

150151
bb7: {
151-
StorageDead(_10); // bb7[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
152-
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb7[1]: scope 3 at $DIR/region-subtyping-basic.rs:20:12: 22:6
152+
StorageDead(_10); // bb7[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:18: 23:19
153+
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb7[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6
153154
// ty::Const
154155
// + ty: ()
155156
// + val: Value(Scalar(<ZST>))
156157
// mir::Constant
157-
// + span: $DIR/region-subtyping-basic.rs:20:12: 22:6
158+
// + span: $DIR/region-subtyping-basic.rs:22:12: 24:6
158159
// + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
159-
goto -> bb8; // bb7[2]: scope 3 at $DIR/region-subtyping-basic.rs:18:5: 22:6
160+
goto -> bb8; // bb7[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
160161
}
161162

162163
bb8: {
163-
StorageDead(_6); // bb8[0]: scope 2 at $DIR/region-subtyping-basic.rs:23:1: 23:2
164-
StorageDead(_3); // bb8[1]: scope 1 at $DIR/region-subtyping-basic.rs:23:1: 23:2
165-
StorageDead(_2); // bb8[2]: scope 1 at $DIR/region-subtyping-basic.rs:23:1: 23:2
166-
StorageDead(_1); // bb8[3]: scope 0 at $DIR/region-subtyping-basic.rs:23:1: 23:2
167-
StorageDead(_7); // bb8[4]: scope 0 at $DIR/region-subtyping-basic.rs:23:1: 23:2
168-
return; // bb8[5]: scope 0 at $DIR/region-subtyping-basic.rs:23:2: 23:2
164+
StorageDead(_6); // bb8[0]: scope 2 at $DIR/region-subtyping-basic.rs:25:1: 25:2
165+
StorageDead(_3); // bb8[1]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2
166+
StorageDead(_2); // bb8[2]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2
167+
StorageDead(_1); // bb8[3]: scope 0 at $DIR/region-subtyping-basic.rs:25:1: 25:2
168+
StorageDead(_7); // bb8[4]: scope 0 at $DIR/region-subtyping-basic.rs:25:1: 25:2
169+
return; // bb8[5]: scope 0 at $DIR/region-subtyping-basic.rs:25:2: 25:2
169170
}
170171
}

0 commit comments

Comments
 (0)