Skip to content

Commit 247da7b

Browse files
committed
Bless tests
1 parent f1452fc commit 247da7b

4 files changed

+47
-23
lines changed

src/test/mir-opt/enum_cast.bar.mir_map.0.mir

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
fn bar(_1: Bar) -> usize {
44
debug bar => _1; // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
55
let mut _0: usize; // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
6-
let mut _2: isize; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
6+
let _2: Bar; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
7+
let mut _3: isize; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
78

89
bb0: {
9-
_2 = discriminant(_1); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
10-
_0 = move _2 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
10+
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
11+
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
12+
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
13+
_0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
14+
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
1115
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
1216
}
1317
}

src/test/mir-opt/enum_cast.boo.mir_map.0.mir

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
fn boo(_1: Boo) -> usize {
44
debug boo => _1; // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
55
let mut _0: usize; // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
6-
let mut _2: u8; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
6+
let _2: Boo; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
7+
let mut _3: u8; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
78

89
bb0: {
9-
_2 = discriminant(_1); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
10-
_0 = move _2 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
10+
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
11+
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
12+
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
13+
_0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
14+
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
1115
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
1216
}
1317
}

src/test/mir-opt/enum_cast.droppy.mir_map.0.mir

+26-14
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ fn droppy() -> () {
44
let mut _0: (); // return place in scope 0 at $DIR/enum_cast.rs:+0:13: +0:13
55
let _1: (); // in scope 0 at $DIR/enum_cast.rs:+1:5: +6:6
66
let _2: Droppy; // in scope 0 at $DIR/enum_cast.rs:+2:13: +2:14
7-
let mut _4: isize; // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:18
8-
let _5: Droppy; // in scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
7+
let _4: Droppy; // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:18
8+
let mut _5: isize; // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:18
9+
let _6: Droppy; // in scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
910
scope 1 {
1011
debug x => _2; // in scope 1 at $DIR/enum_cast.rs:+2:13: +2:14
1112
scope 2 {
@@ -16,7 +17,7 @@ fn droppy() -> () {
1617
}
1718
}
1819
scope 4 {
19-
debug z => _5; // in scope 4 at $DIR/enum_cast.rs:+7:9: +7:10
20+
debug z => _6; // in scope 4 at $DIR/enum_cast.rs:+7:9: +7:10
2021
}
2122

2223
bb0: {
@@ -25,30 +26,41 @@ fn droppy() -> () {
2526
_2 = Droppy::C; // scope 0 at $DIR/enum_cast.rs:+2:17: +2:26
2627
FakeRead(ForLet(None), _2); // scope 0 at $DIR/enum_cast.rs:+2:13: +2:14
2728
StorageLive(_3); // scope 3 at $DIR/enum_cast.rs:+5:13: +5:14
28-
_4 = discriminant(_2); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
29-
_3 = move _4 as usize (IntToInt); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
29+
StorageLive(_4); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18
30+
_4 = move _2; // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18
31+
_5 = discriminant(_4); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
32+
_3 = move _5 as usize (IntToInt); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
33+
drop(_4) -> [return: bb1, unwind: bb4]; // scope 3 at $DIR/enum_cast.rs:+5:26: +5:27
34+
}
35+
36+
bb1: {
37+
StorageDead(_4); // scope 3 at $DIR/enum_cast.rs:+5:26: +5:27
3038
FakeRead(ForLet(None), _3); // scope 3 at $DIR/enum_cast.rs:+5:13: +5:14
3139
_1 = const (); // scope 0 at $DIR/enum_cast.rs:+1:5: +6:6
3240
StorageDead(_3); // scope 1 at $DIR/enum_cast.rs:+6:5: +6:6
33-
drop(_2) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
41+
drop(_2) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
3442
}
3543

36-
bb1: {
44+
bb2: {
3745
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
3846
StorageDead(_1); // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
39-
StorageLive(_5); // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
40-
_5 = Droppy::B; // scope 0 at $DIR/enum_cast.rs:+7:13: +7:22
41-
FakeRead(ForLet(None), _5); // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
47+
StorageLive(_6); // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
48+
_6 = Droppy::B; // scope 0 at $DIR/enum_cast.rs:+7:13: +7:22
49+
FakeRead(ForLet(None), _6); // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
4250
_0 = const (); // scope 0 at $DIR/enum_cast.rs:+0:13: +8:2
43-
drop(_5) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
51+
drop(_6) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
4452
}
4553

46-
bb2: {
47-
StorageDead(_5); // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
54+
bb3: {
55+
StorageDead(_6); // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
4856
return; // scope 0 at $DIR/enum_cast.rs:+8:2: +8:2
4957
}
5058

51-
bb3 (cleanup): {
59+
bb4 (cleanup): {
60+
drop(_2) -> bb5; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
61+
}
62+
63+
bb5 (cleanup): {
5264
resume; // scope 0 at $DIR/enum_cast.rs:+0:1: +8:2
5365
}
5466
}

src/test/mir-opt/enum_cast.foo.mir_map.0.mir

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
fn foo(_1: Foo) -> usize {
44
debug foo => _1; // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
55
let mut _0: usize; // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
6-
let mut _2: isize; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
6+
let _2: Foo; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
7+
let mut _3: isize; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
78

89
bb0: {
9-
_2 = discriminant(_1); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
10-
_0 = move _2 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
10+
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
11+
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
12+
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
13+
_0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
14+
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
1115
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
1216
}
1317
}

0 commit comments

Comments
 (0)