Skip to content

Commit b932751

Browse files
committed
Ignore the unwrap_unchecked test on wasm32-unknown-unknown
1 parent 88e78ab commit b932751

3 files changed

+4
-3
lines changed

tests/mir-opt/inline/unwrap_unchecked.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![crate_type = "lib"]
22

3+
// ignore-wasm32-bare compiled with panic=abort by default
34
// ignore-debug: the debug assertions prevent the inlining we are testing for
45
// compile-flags: -Zmir-opt-level=2 -Zinline-mir
56

tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
debug slf => _1; // in scope 0 at $DIR/unwrap_unchecked.rs:+0:35: +0:38
66
let mut _0: T; // return place in scope 0 at $DIR/unwrap_unchecked.rs:+0:54: +0:55
77
let mut _2: std::option::Option<T>; // in scope 0 at $DIR/unwrap_unchecked.rs:+1:5: +1:8
8-
+ scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) { // at $DIR/unwrap_unchecked.rs:9:9: 9:27
8+
+ scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) { // at $DIR/unwrap_unchecked.rs:10:9: 10:27
99
+ debug self => _2; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
1010
+ let mut _3: &std::option::Option<T>; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
1111
+ let mut _4: isize; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
@@ -30,7 +30,7 @@
3030
_2 = move _1; // scope 0 at $DIR/unwrap_unchecked.rs:+1:5: +1:8
3131
- _0 = Option::<T>::unwrap_unchecked(move _2) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/unwrap_unchecked.rs:+1:5: +1:27
3232
- // mir::Constant
33-
- // + span: $DIR/unwrap_unchecked.rs:9:9: 9:25
33+
- // + span: $DIR/unwrap_unchecked.rs:10:9: 10:25
3434
- // + literal: Const { ty: unsafe fn(Option<T>) -> T {Option::<T>::unwrap_unchecked}, val: Value(<ZST>) }
3535
+ StorageLive(_3); // scope 0 at $DIR/unwrap_unchecked.rs:+1:9: +1:27
3636
+ _4 = discriminant(_2); // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL

tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
fn unwrap_unchecked(_1: Option<T>) -> T {
44
debug slf => _1; // in scope 0 at $DIR/unwrap_unchecked.rs:+0:35: +0:38
55
let mut _0: T; // return place in scope 0 at $DIR/unwrap_unchecked.rs:+0:54: +0:55
6-
scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) { // at $DIR/unwrap_unchecked.rs:9:9: 9:27
6+
scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) { // at $DIR/unwrap_unchecked.rs:10:9: 10:27
77
debug self => _1; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
88
let mut _2: &std::option::Option<T>; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
99
let mut _3: isize; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL

0 commit comments

Comments
 (0)