blob: d14c42a330eb7f3da2df12f2fc5ce071541a9aee [file] [log] [blame] [edit]
- // MIR for `unwrap_unchecked` before SimplifyConstCondition-after-inst-simplify
+ // MIR for `unwrap_unchecked` after SimplifyConstCondition-after-inst-simplify
fn unwrap_unchecked(_1: &Option<i32>) -> i32 {
debug v => _1;
let mut _0: i32;
let _2: i32;
let mut _3: std::option::Option<i32>;
scope 1 {
debug v => _2;
}
scope 2 (inlined #[track_caller] Option::<i32>::unwrap_unchecked) {
let mut _4: isize;
scope 3 {
}
scope 4 (inlined #[track_caller] unreachable_unchecked) {
let _5: ();
scope 5 (inlined core::ub_checks::check_language_ub) {
let mut _6: bool;
scope 6 (inlined core::ub_checks::check_language_ub::runtime) {
}
}
}
}
bb0: {
StorageLive(_2);
StorageLive(_3);
_3 = copy (*_1);
StorageLive(_4);
StorageLive(_5);
_4 = discriminant(_3);
switchInt(move _4) -> [0: bb2, 1: bb3, otherwise: bb1];
}
bb1: {
unreachable;
}
bb2: {
- StorageLive(_6);
- _6 = const false;
- assume(copy _6);
- _5 = unreachable_unchecked::precondition_check() -> [return: bb1, unwind unreachable];
+ unreachable;
}
bb3: {
_2 = move ((_3 as Some).0: i32);
StorageDead(_5);
StorageDead(_4);
StorageDead(_3);
_0 = copy _2;
StorageDead(_2);
return;
}
}