Ignore test on wasm as it does not unwind
This commit is contained in:
parent
ff241633f4
commit
05f84c67a4
5 changed files with 47 additions and 46 deletions
|
@ -2,31 +2,31 @@
|
|||
+ // MIR for `cannot_opt_generic` after RemoveUnneededDrops
|
||||
|
||||
fn cannot_opt_generic(_1: T) -> () {
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:19:26: 19:27
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:19:32: 19:32
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:20:5: 20:12
|
||||
let mut _3: T; // in scope 0 at $DIR/remove_unneeded_drops.rs:20:10: 20:11
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:20:26: 20:27
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:20:32: 20:32
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
|
||||
let mut _3: T; // in scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
|
||||
scope 1 {
|
||||
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:20:5: 20:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:20:10: 20:11
|
||||
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:20:10: 20:11
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
|
||||
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
|
||||
_2 = const (); // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb1 (cleanup): {
|
||||
resume; // scope 0 at $DIR/remove_unneeded_drops.rs:19:1: 21:2
|
||||
resume; // scope 0 at $DIR/remove_unneeded_drops.rs:20:1: 22:2
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:20:11: 20:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:20:12: 20:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:19:32: 21:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:21:2: 21:2
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:21:11: 21:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:21:12: 21:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:20:32: 22:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:22:2: 22:2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,31 +2,31 @@
|
|||
+ // MIR for `dont_opt` after RemoveUnneededDrops
|
||||
|
||||
fn dont_opt(_1: Vec<bool>) -> () {
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:7:13: 7:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:7:27: 7:27
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:8:5: 8:12
|
||||
let mut _3: std::vec::Vec<bool>; // in scope 0 at $DIR/remove_unneeded_drops.rs:8:10: 8:11
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:8:13: 8:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:8:27: 8:27
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
|
||||
let mut _3: std::vec::Vec<bool>; // in scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
|
||||
scope 1 {
|
||||
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:8:5: 8:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:8:10: 8:11
|
||||
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:8:10: 8:11
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
|
||||
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
|
||||
_2 = const (); // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb1 (cleanup): {
|
||||
resume; // scope 0 at $DIR/remove_unneeded_drops.rs:7:1: 9:2
|
||||
resume; // scope 0 at $DIR/remove_unneeded_drops.rs:8:1: 10:2
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:8:11: 8:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:8:12: 8:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:7:27: 9:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:9:2: 9:2
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:9:11: 9:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:9:12: 9:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:8:27: 10:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:10:2: 10:2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,27 +2,27 @@
|
|||
+ // MIR for `opt` after RemoveUnneededDrops
|
||||
|
||||
fn opt(_1: bool) -> () {
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:2:8: 2:9
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:2:17: 2:17
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:3:5: 3:12
|
||||
let mut _3: bool; // in scope 0 at $DIR/remove_unneeded_drops.rs:3:10: 3:11
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:3:8: 3:9
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:3:17: 3:17
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
|
||||
let mut _3: bool; // in scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
|
||||
scope 1 {
|
||||
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:3:5: 3:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:3:10: 3:11
|
||||
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:3:10: 3:11
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
|
||||
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
|
||||
_2 = const (); // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
- drop(_3) -> bb1; // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
- }
|
||||
-
|
||||
- bb1: {
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:3:11: 3:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:3:12: 3:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:2:17: 4:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:4:2: 4:2
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:4:11: 4:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:4:12: 4:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:3:17: 5:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:5:2: 5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,27 +2,27 @@
|
|||
+ // MIR for `opt_generic_copy` after RemoveUnneededDrops
|
||||
|
||||
fn opt_generic_copy(_1: T) -> () {
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:12:30: 12:31
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:12:36: 12:36
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:13:5: 13:12
|
||||
let mut _3: T; // in scope 0 at $DIR/remove_unneeded_drops.rs:13:10: 13:11
|
||||
debug x => _1; // in scope 0 at $DIR/remove_unneeded_drops.rs:13:30: 13:31
|
||||
let mut _0: (); // return place in scope 0 at $DIR/remove_unneeded_drops.rs:13:36: 13:36
|
||||
let _2: (); // in scope 0 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
|
||||
let mut _3: T; // in scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
|
||||
scope 1 {
|
||||
debug _x => _3; // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:13:5: 13:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:13:10: 13:11
|
||||
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:13:10: 13:11
|
||||
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
|
||||
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
|
||||
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
|
||||
_2 = const (); // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
- drop(_3) -> bb1; // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
- }
|
||||
-
|
||||
- bb1: {
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:13:11: 13:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:13:12: 13:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:12:36: 14:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:14:2: 14:2
|
||||
StorageDead(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:14:11: 14:12
|
||||
StorageDead(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:14:12: 14:13
|
||||
_0 = const (); // scope 0 at $DIR/remove_unneeded_drops.rs:13:36: 15:2
|
||||
return; // scope 0 at $DIR/remove_unneeded_drops.rs:15:2: 15:2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// EMIT_MIR remove_unneeded_drops.opt.RemoveUnneededDrops.diff
|
||||
fn opt(x: bool) {
|
||||
drop(x);
|
||||
|
|
Loading…
Add table
Reference in a new issue