Skip to content

Commit ae53315

Browse files
Ignore generator-drop-cleanup on wasm32-bare
1 parent 7bbdd2d commit ae53315

File tree

2 files changed

+33
-31
lines changed

2 files changed

+33
-31
lines changed

src/test/mir-opt/generator-drop-cleanup.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#![feature(generators, generator_trait)]
22

3+
// ignore-wasm32-bare compiled with panic=abort by default
4+
35
// Regression test for #58892, generator drop shims should not have blocks
46
// spuriously marked as cleanup
57

Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
11
// MIR for `main::{{closure}}#0` 0 generator_drop
22
// generator_layout = GeneratorLayout { field_tys: [std::string::String], variant_fields: [[], [], [], [_0]], storage_conflicts: BitMatrix { num_rows: 1, num_columns: 1, words: [1], marker: PhantomData } }
33

4-
fn main::{{closure}}#0(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:8:15: 11:6 {std::string::String, ()}]) -> () {
5-
let mut _0: (); // return place in scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
6-
let mut _2: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
7-
let _3: std::string::String; // in scope 0 at $DIR/generator-drop-cleanup.rs:9:13: 9:15
8-
let _4: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:9: 10:14
9-
let mut _5: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:9: 10:14
10-
let mut _7: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:8:18: 8:18
11-
let mut _8: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
12-
let mut _9: isize; // in scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
4+
fn main::{{closure}}#0(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 13:6 {std::string::String, ()}]) -> () {
5+
let mut _0: (); // return place in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
6+
let mut _2: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
7+
let _3: std::string::String; // in scope 0 at $DIR/generator-drop-cleanup.rs:11:13: 11:15
8+
let _4: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:12:9: 12:14
9+
let mut _5: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:12:9: 12:14
10+
let mut _7: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:18: 10:18
11+
let mut _8: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
12+
let mut _9: isize; // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
1313
scope 1 {
14-
debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator-drop-cleanup.rs:9:13: 9:15
14+
debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator-drop-cleanup.rs:11:13: 11:15
1515
}
1616
scope 2 {
17-
let mut _6: std::vec::Vec<u8>; // in scope 2 at $DIR/generator-drop-cleanup.rs:9:18: 9:31
17+
let mut _6: std::vec::Vec<u8>; // in scope 2 at $DIR/generator-drop-cleanup.rs:11:18: 11:31
1818
scope 3 {
1919
}
2020
}
2121

2222
bb0: {
23-
_9 = discriminant((*_1)); // bb0[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
24-
switchInt(move _9) -> [0u32: bb7, 3u32: bb11, otherwise: bb12]; // bb0[1]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
23+
_9 = discriminant((*_1)); // bb0[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
24+
switchInt(move _9) -> [0u32: bb7, 3u32: bb11, otherwise: bb12]; // bb0[1]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
2525
}
2626

2727
bb1 (cleanup): {
28-
resume; // bb1[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
28+
resume; // bb1[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
2929
}
3030

3131
bb2 (cleanup): {
32-
nop; // bb2[0]: scope 0 at $DIR/generator-drop-cleanup.rs:11:5: 11:6
33-
goto -> bb8; // bb2[1]: scope 0 at $DIR/generator-drop-cleanup.rs:11:5: 11:6
32+
nop; // bb2[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
33+
goto -> bb8; // bb2[1]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
3434
}
3535

3636
bb3: {
37-
StorageDead(_5); // bb3[0]: scope 1 at $DIR/generator-drop-cleanup.rs:10:13: 10:14
38-
StorageDead(_4); // bb3[1]: scope 1 at $DIR/generator-drop-cleanup.rs:10:14: 10:15
39-
drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb4, unwind: bb2]; // bb3[2]: scope 0 at $DIR/generator-drop-cleanup.rs:11:5: 11:6
37+
StorageDead(_5); // bb3[0]: scope 1 at $DIR/generator-drop-cleanup.rs:12:13: 12:14
38+
StorageDead(_4); // bb3[1]: scope 1 at $DIR/generator-drop-cleanup.rs:12:14: 12:15
39+
drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb4, unwind: bb2]; // bb3[2]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
4040
}
4141

4242
bb4: {
43-
nop; // bb4[0]: scope 0 at $DIR/generator-drop-cleanup.rs:11:5: 11:6
44-
goto -> bb9; // bb4[1]: scope 0 at $DIR/generator-drop-cleanup.rs:11:5: 11:6
43+
nop; // bb4[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
44+
goto -> bb9; // bb4[1]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
4545
}
4646

4747
bb5: {
48-
return; // bb5[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
48+
return; // bb5[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
4949
}
5050

5151
bb6: {
52-
return; // bb6[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
52+
return; // bb6[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
5353
}
5454

5555
bb7: {
56-
goto -> bb10; // bb7[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
56+
goto -> bb10; // bb7[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
5757
}
5858

5959
bb8 (cleanup): {
60-
goto -> bb1; // bb8[0]: scope 0 at $DIR/generator-drop-cleanup.rs:11:5: 11:6
60+
goto -> bb1; // bb8[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
6161
}
6262

6363
bb9: {
64-
goto -> bb5; // bb9[0]: scope 0 at $DIR/generator-drop-cleanup.rs:11:5: 11:6
64+
goto -> bb5; // bb9[0]: scope 0 at $DIR/generator-drop-cleanup.rs:13:5: 13:6
6565
}
6666

6767
bb10: {
68-
goto -> bb6; // bb10[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
68+
goto -> bb6; // bb10[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
6969
}
7070

7171
bb11: {
72-
StorageLive(_4); // bb11[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
73-
StorageLive(_5); // bb11[1]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
74-
goto -> bb3; // bb11[2]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
72+
StorageLive(_4); // bb11[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
73+
StorageLive(_5); // bb11[1]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
74+
goto -> bb3; // bb11[2]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
7575
}
7676

7777
bb12: {
78-
return; // bb12[0]: scope 0 at $DIR/generator-drop-cleanup.rs:8:15: 11:6
78+
return; // bb12[0]: scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6
7979
}
8080
}

0 commit comments

Comments
 (0)