Skip to content

Commit d38553c

Browse files
committed
Ignore a test on wasm, because that changes landing pads
1 parent 03c6364 commit d38553c

File tree

4 files changed

+39
-37
lines changed

4 files changed

+39
-37
lines changed

src/test/mir-opt/inline/cycle.f.Inline.diff

+19-19
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@
22
+ // MIR for `f` after Inline
33

44
fn f(_1: impl Fn()) -> () {
5-
debug g => _1; // in scope 0 at $DIR/cycle.rs:3:6: 3:7
6-
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:3:20: 3:20
7-
let _2: (); // in scope 0 at $DIR/cycle.rs:4:5: 4:8
8-
let mut _3: &impl Fn(); // in scope 0 at $DIR/cycle.rs:4:5: 4:6
9-
let mut _4: (); // in scope 0 at $DIR/cycle.rs:4:5: 4:8
5+
debug g => _1; // in scope 0 at $DIR/cycle.rs:5:6: 5:7
6+
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:5:20: 5:20
7+
let _2: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8
8+
let mut _3: &impl Fn(); // in scope 0 at $DIR/cycle.rs:6:5: 6:6
9+
let mut _4: (); // in scope 0 at $DIR/cycle.rs:6:5: 6:8
1010

1111
bb0: {
12-
StorageLive(_2); // scope 0 at $DIR/cycle.rs:4:5: 4:8
13-
StorageLive(_3); // scope 0 at $DIR/cycle.rs:4:5: 4:6
14-
_3 = &_1; // scope 0 at $DIR/cycle.rs:4:5: 4:6
15-
StorageLive(_4); // scope 0 at $DIR/cycle.rs:4:5: 4:8
16-
_2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:4:5: 4:8
12+
StorageLive(_2); // scope 0 at $DIR/cycle.rs:6:5: 6:8
13+
StorageLive(_3); // scope 0 at $DIR/cycle.rs:6:5: 6:6
14+
_3 = &_1; // scope 0 at $DIR/cycle.rs:6:5: 6:6
15+
StorageLive(_4); // scope 0 at $DIR/cycle.rs:6:5: 6:8
16+
_2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:6:5: 6:8
1717
// mir::Constant
18-
// + span: $DIR/cycle.rs:4:5: 4:6
18+
// + span: $DIR/cycle.rs:6:5: 6:6
1919
// + literal: Const { ty: for<'r> extern "rust-call" fn(&'r impl Fn(), ()) -> <impl Fn() as std::ops::FnOnce<()>>::Output {<impl Fn() as std::ops::Fn<()>>::call}, val: Value(Scalar(<ZST>)) }
2020
}
2121

2222
bb1: {
23-
StorageDead(_4); // scope 0 at $DIR/cycle.rs:4:7: 4:8
24-
StorageDead(_3); // scope 0 at $DIR/cycle.rs:4:7: 4:8
25-
StorageDead(_2); // scope 0 at $DIR/cycle.rs:4:8: 4:9
26-
_0 = const (); // scope 0 at $DIR/cycle.rs:3:20: 5:2
27-
drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/cycle.rs:5:1: 5:2
23+
StorageDead(_4); // scope 0 at $DIR/cycle.rs:6:7: 6:8
24+
StorageDead(_3); // scope 0 at $DIR/cycle.rs:6:7: 6:8
25+
StorageDead(_2); // scope 0 at $DIR/cycle.rs:6:8: 6:9
26+
_0 = const (); // scope 0 at $DIR/cycle.rs:5:20: 7:2
27+
drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/cycle.rs:7:1: 7:2
2828
}
2929

3030
bb2: {
31-
return; // scope 0 at $DIR/cycle.rs:5:2: 5:2
31+
return; // scope 0 at $DIR/cycle.rs:7:2: 7:2
3232
}
3333

3434
bb3 (cleanup): {
35-
drop(_1) -> bb4; // scope 0 at $DIR/cycle.rs:5:1: 5:2
35+
drop(_1) -> bb4; // scope 0 at $DIR/cycle.rs:7:1: 7:2
3636
}
3737

3838
bb4 (cleanup): {
39-
resume; // scope 0 at $DIR/cycle.rs:3:1: 5:2
39+
resume; // scope 0 at $DIR/cycle.rs:5:1: 7:2
4040
}
4141
}
4242

src/test/mir-opt/inline/cycle.g.Inline.diff

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
+ // MIR for `g` after Inline
33

44
fn g() -> () {
5-
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:9:8: 9:8
6-
let _1: (); // in scope 0 at $DIR/cycle.rs:10:5: 10:12
5+
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:11:8: 11:8
6+
let _1: (); // in scope 0 at $DIR/cycle.rs:12:5: 12:12
77

88
bb0: {
9-
StorageLive(_1); // scope 0 at $DIR/cycle.rs:10:5: 10:12
10-
_1 = f::<fn() {main}>(main) -> bb1; // scope 0 at $DIR/cycle.rs:10:5: 10:12
9+
StorageLive(_1); // scope 0 at $DIR/cycle.rs:12:5: 12:12
10+
_1 = f::<fn() {main}>(main) -> bb1; // scope 0 at $DIR/cycle.rs:12:5: 12:12
1111
// mir::Constant
12-
// + span: $DIR/cycle.rs:10:5: 10:6
12+
// + span: $DIR/cycle.rs:12:5: 12:6
1313
// + literal: Const { ty: fn(fn() {main}) {f::<fn() {main}>}, val: Value(Scalar(<ZST>)) }
1414
// mir::Constant
15-
// + span: $DIR/cycle.rs:10:7: 10:11
15+
// + span: $DIR/cycle.rs:12:7: 12:11
1616
// + literal: Const { ty: fn() {main}, val: Value(Scalar(<ZST>)) }
1717
}
1818

1919
bb1: {
20-
StorageDead(_1); // scope 0 at $DIR/cycle.rs:10:12: 10:13
21-
_0 = const (); // scope 0 at $DIR/cycle.rs:9:8: 11:2
22-
return; // scope 0 at $DIR/cycle.rs:11:2: 11:2
20+
StorageDead(_1); // scope 0 at $DIR/cycle.rs:12:12: 12:13
21+
_0 = const (); // scope 0 at $DIR/cycle.rs:11:8: 13:2
22+
return; // scope 0 at $DIR/cycle.rs:13:2: 13:2
2323
}
2424
}
2525

src/test/mir-opt/inline/cycle.main.Inline.diff

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
+ // MIR for `main` after Inline
33

44
fn main() -> () {
5-
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:14:11: 14:11
6-
let _1: (); // in scope 0 at $DIR/cycle.rs:15:5: 15:9
5+
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:16:11: 16:11
6+
let _1: (); // in scope 0 at $DIR/cycle.rs:17:5: 17:9
77

88
bb0: {
9-
StorageLive(_1); // scope 0 at $DIR/cycle.rs:15:5: 15:9
10-
_1 = f::<fn() {g}>(g) -> bb1; // scope 0 at $DIR/cycle.rs:15:5: 15:9
9+
StorageLive(_1); // scope 0 at $DIR/cycle.rs:17:5: 17:9
10+
_1 = f::<fn() {g}>(g) -> bb1; // scope 0 at $DIR/cycle.rs:17:5: 17:9
1111
// mir::Constant
12-
// + span: $DIR/cycle.rs:15:5: 15:6
12+
// + span: $DIR/cycle.rs:17:5: 17:6
1313
// + literal: Const { ty: fn(fn() {g}) {f::<fn() {g}>}, val: Value(Scalar(<ZST>)) }
1414
// mir::Constant
15-
// + span: $DIR/cycle.rs:15:7: 15:8
15+
// + span: $DIR/cycle.rs:17:7: 17:8
1616
// + literal: Const { ty: fn() {g}, val: Value(Scalar(<ZST>)) }
1717
}
1818

1919
bb1: {
20-
StorageDead(_1); // scope 0 at $DIR/cycle.rs:15:9: 15:10
21-
_0 = const (); // scope 0 at $DIR/cycle.rs:14:11: 16:2
22-
return; // scope 0 at $DIR/cycle.rs:16:2: 16:2
20+
StorageDead(_1); // scope 0 at $DIR/cycle.rs:17:9: 17:10
21+
_0 = const (); // scope 0 at $DIR/cycle.rs:16:11: 18:2
22+
return; // scope 0 at $DIR/cycle.rs:18:2: 18:2
2323
}
2424
}
2525

src/test/mir-opt/inline/cycle.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-wasm32-bare compiled with panic=abort by default
2+
13
// EMIT_MIR cycle.f.Inline.diff
24
#[inline(always)]
35
fn f(g: impl Fn()) {

0 commit comments

Comments
 (0)