Rollup merge of #128262 - DianQK:remove-unused-tests, r=saethlin

Delete `SimplifyArmIdentity` and `SimplifyBranchSame` tests

These two passes have already been deleted in #107256. I'm not sure why tidy didn't catch it.

As regression tests, I didn't delete `tests/ui/mir/issue-66851.rs` and `tests/ui/mir/simplify-branch-same.rs`.

r? compiler
This commit is contained in:
Trevor Gross 2024-07-27 13:32:58 -04:00 committed by GitHub
commit 356f190eed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 0 additions and 436 deletions

View File

@ -1,34 +0,0 @@
//@ compile-flags: -C no-prepopulate-passes -O -Z mir-opt-level=3 -Zunsound-mir-opts
// Ensure that `x?` has no overhead on `Result<T, E>` due to identity `match`es in lowering.
// This requires inlining to trigger the MIR optimizations in `SimplifyArmIdentity`.
#![crate_type = "lib"]
type R = Result<u64, i32>;
// This was written to the `?` from `try_trait`, but `try_trait_v2` uses a different structure,
// so the relevant desugar is copied inline in order to keep the test testing the same thing.
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR
// optimization that picks up the `?` desugaring, as `SimplifyArmIdentity` does not.
#[no_mangle]
pub fn try_identity(x: R) -> R {
// CHECK: start:
// FIXME(JakobDegen): Broken by deaggregation change CHECK-NOT\: br {{.*}}
// CHECK ret void
let y = match into_result(x) {
Err(e) => return from_error(From::from(e)),
Ok(v) => v,
};
Ok(y)
}
#[inline]
fn into_result<T, E>(r: Result<T, E>) -> Result<T, E> {
r
}
#[inline]
fn from_error<T, E>(e: E) -> Result<T, E> {
Err(e)
}

View File

@ -1,89 +0,0 @@
- // MIR for `id_try` before SimplifyArmIdentity
+ // MIR for `id_try` after SimplifyArmIdentity
fn id_try(_1: Result<u8, i32>) -> Result<u8, i32> {
debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:+0:11: +0:12
let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:+0:34: +0:49
let _2: u8; // in scope 0 at $DIR/simplify-arm.rs:+1:9: +1:10
let mut _3: std::result::Result<u8, i32>; // in scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
let mut _4: std::result::Result<u8, i32>; // in scope 0 at $DIR/simplify-arm.rs:+1:31: +1:32
let mut _5: isize; // in scope 0 at $DIR/simplify-arm.rs:+2:9: +2:15
let _6: i32; // in scope 0 at $DIR/simplify-arm.rs:+2:13: +2:14
let mut _7: !; // in scope 0 at $DIR/simplify-arm.rs:+2:19: +2:51
let mut _8: i32; // in scope 0 at $DIR/simplify-arm.rs:+2:37: +2:50
let mut _9: i32; // in scope 0 at $DIR/simplify-arm.rs:+2:48: +2:49
let _10: u8; // in scope 0 at $DIR/simplify-arm.rs:+3:12: +3:13
let mut _11: u8; // in scope 0 at $DIR/simplify-arm.rs:+5:8: +5:9
scope 1 {
debug x => _2; // in scope 1 at $DIR/simplify-arm.rs:+1:9: +1:10
}
scope 2 {
debug e => _6; // in scope 2 at $DIR/simplify-arm.rs:+2:13: +2:14
scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify-arm.rs:37:37: 37:50
debug t => _9; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 6 (inlined from_error::<u8, i32>) { // at $DIR/simplify-arm.rs:37:26: 37:51
debug e => _8; // in scope 6 at $DIR/simplify-arm.rs:27:21: 27:22
}
}
scope 3 {
debug v => _10; // in scope 3 at $DIR/simplify-arm.rs:+3:12: +3:13
}
scope 4 (inlined into_result::<u8, i32>) { // at $DIR/simplify-arm.rs:36:19: 36:33
debug r => _4; // in scope 4 at $DIR/simplify-arm.rs:23:22: 23:23
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/simplify-arm.rs:+1:9: +1:10
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
StorageLive(_4); // scope 0 at $DIR/simplify-arm.rs:+1:31: +1:32
_4 = _1; // scope 0 at $DIR/simplify-arm.rs:+1:31: +1:32
_3 = move _4; // scope 4 at $DIR/simplify-arm.rs:24:5: 24:6
StorageDead(_4); // scope 0 at $DIR/simplify-arm.rs:+1:32: +1:33
_5 = discriminant(_3); // scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
switchInt(move _5) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:+1:13: +1:33
}
bb1: {
StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:+3:12: +3:13
_10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:+3:12: +3:13
_2 = _10; // scope 3 at $DIR/simplify-arm.rs:+3:18: +3:19
StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:+3:18: +3:19
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:+4:6: +4:7
StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:+5:8: +5:9
_11 = _2; // scope 1 at $DIR/simplify-arm.rs:+5:8: +5:9
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:+5:5: +5:10
((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:+5:5: +5:10
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:+5:5: +5:10
StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:+5:9: +5:10
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:+6:1: +6:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:+6:2: +6:2
}
bb2: {
unreachable; // scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
}
bb3: {
StorageLive(_6); // scope 0 at $DIR/simplify-arm.rs:+2:13: +2:14
_6 = ((_3 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:+2:13: +2:14
StorageLive(_8); // scope 2 at $DIR/simplify-arm.rs:+2:37: +2:50
StorageLive(_9); // scope 2 at $DIR/simplify-arm.rs:+2:48: +2:49
_9 = _6; // scope 2 at $DIR/simplify-arm.rs:+2:48: +2:49
_8 = move _9; // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_9); // scope 2 at $DIR/simplify-arm.rs:+2:49: +2:50
((_0 as Err).0: i32) = move _8; // scope 6 at $DIR/simplify-arm.rs:28:9: 28:10
Deinit(_0); // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
discriminant(_0) = 1; // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
StorageDead(_8); // scope 2 at $DIR/simplify-arm.rs:+2:50: +2:51
StorageDead(_6); // scope 0 at $DIR/simplify-arm.rs:+2:50: +2:51
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:+4:6: +4:7
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:+6:1: +6:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:+6:2: +6:2
}
bb4: {
return; // scope 0 at $DIR/simplify-arm.rs:+6:2: +6:2
}
}

View File

@ -1,89 +0,0 @@
- // MIR for `id_try` before SimplifyBranchSame
+ // MIR for `id_try` after SimplifyBranchSame
fn id_try(_1: Result<u8, i32>) -> Result<u8, i32> {
debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:+0:11: +0:12
let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:+0:34: +0:49
let _2: u8; // in scope 0 at $DIR/simplify-arm.rs:+1:9: +1:10
let mut _3: std::result::Result<u8, i32>; // in scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
let mut _4: std::result::Result<u8, i32>; // in scope 0 at $DIR/simplify-arm.rs:+1:31: +1:32
let mut _5: isize; // in scope 0 at $DIR/simplify-arm.rs:+2:9: +2:15
let _6: i32; // in scope 0 at $DIR/simplify-arm.rs:+2:13: +2:14
let mut _7: !; // in scope 0 at $DIR/simplify-arm.rs:+2:19: +2:51
let mut _8: i32; // in scope 0 at $DIR/simplify-arm.rs:+2:37: +2:50
let mut _9: i32; // in scope 0 at $DIR/simplify-arm.rs:+2:48: +2:49
let _10: u8; // in scope 0 at $DIR/simplify-arm.rs:+3:12: +3:13
let mut _11: u8; // in scope 0 at $DIR/simplify-arm.rs:+5:8: +5:9
scope 1 {
debug x => _2; // in scope 1 at $DIR/simplify-arm.rs:+1:9: +1:10
}
scope 2 {
debug e => _6; // in scope 2 at $DIR/simplify-arm.rs:+2:13: +2:14
scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify-arm.rs:37:37: 37:50
debug t => _9; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 6 (inlined from_error::<u8, i32>) { // at $DIR/simplify-arm.rs:37:26: 37:51
debug e => _8; // in scope 6 at $DIR/simplify-arm.rs:27:21: 27:22
}
}
scope 3 {
debug v => _10; // in scope 3 at $DIR/simplify-arm.rs:+3:12: +3:13
}
scope 4 (inlined into_result::<u8, i32>) { // at $DIR/simplify-arm.rs:36:19: 36:33
debug r => _4; // in scope 4 at $DIR/simplify-arm.rs:23:22: 23:23
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/simplify-arm.rs:+1:9: +1:10
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
StorageLive(_4); // scope 0 at $DIR/simplify-arm.rs:+1:31: +1:32
_4 = _1; // scope 0 at $DIR/simplify-arm.rs:+1:31: +1:32
_3 = move _4; // scope 4 at $DIR/simplify-arm.rs:24:5: 24:6
StorageDead(_4); // scope 0 at $DIR/simplify-arm.rs:+1:32: +1:33
_5 = discriminant(_3); // scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
switchInt(move _5) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:+1:13: +1:33
}
bb1: {
StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:+3:12: +3:13
_10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:+3:12: +3:13
_2 = _10; // scope 3 at $DIR/simplify-arm.rs:+3:18: +3:19
StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:+3:18: +3:19
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:+4:6: +4:7
StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:+5:8: +5:9
_11 = _2; // scope 1 at $DIR/simplify-arm.rs:+5:8: +5:9
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:+5:5: +5:10
((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:+5:5: +5:10
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:+5:5: +5:10
StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:+5:9: +5:10
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:+6:1: +6:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:+6:2: +6:2
}
bb2: {
unreachable; // scope 0 at $DIR/simplify-arm.rs:+1:19: +1:33
}
bb3: {
StorageLive(_6); // scope 0 at $DIR/simplify-arm.rs:+2:13: +2:14
_6 = ((_3 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:+2:13: +2:14
StorageLive(_8); // scope 2 at $DIR/simplify-arm.rs:+2:37: +2:50
StorageLive(_9); // scope 2 at $DIR/simplify-arm.rs:+2:48: +2:49
_9 = _6; // scope 2 at $DIR/simplify-arm.rs:+2:48: +2:49
_8 = move _9; // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_9); // scope 2 at $DIR/simplify-arm.rs:+2:49: +2:50
((_0 as Err).0: i32) = move _8; // scope 6 at $DIR/simplify-arm.rs:28:9: 28:10
Deinit(_0); // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
discriminant(_0) = 1; // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
StorageDead(_8); // scope 2 at $DIR/simplify-arm.rs:+2:50: +2:51
StorageDead(_6); // scope 0 at $DIR/simplify-arm.rs:+2:50: +2:51
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:+4:6: +4:7
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:+6:1: +6:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:+6:2: +6:2
}
bb4: {
return; // scope 0 at $DIR/simplify-arm.rs:+6:2: +6:2
}
}

View File

@ -1,50 +0,0 @@
// skip-filecheck
//@ compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
// EMIT_MIR simplify_arm.id.SimplifyArmIdentity.diff
// EMIT_MIR simplify_arm.id.SimplifyBranchSame.diff
// EMIT_MIR simplify_arm.id_result.SimplifyArmIdentity.diff
// EMIT_MIR simplify_arm.id_result.SimplifyBranchSame.diff
// EMIT_MIR simplify_arm.id_try.SimplifyArmIdentity.diff
// EMIT_MIR simplify_arm.id_try.SimplifyBranchSame.diff
//@ ignore-test This pass is broken since deaggregation changed
fn id(o: Option<u8>) -> Option<u8> {
match o {
Some(v) => Some(v),
None => None,
}
}
fn id_result(r: Result<u8, i32>) -> Result<u8, i32> {
match r {
Ok(x) => Ok(x),
Err(y) => Err(y),
}
}
fn into_result<T, E>(r: Result<T, E>) -> Result<T, E> {
r
}
fn from_error<T, E>(e: E) -> Result<T, E> {
Err(e)
}
// This was written to the `?` from `try_trait`, but `try_trait_v2` uses a different structure,
// so the relevant desugar is copied inline in order to keep the test testing the same thing.
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR
// optimization that picks up the `?` desugaring, as `SimplifyArmIdentity` does not.
fn id_try(r: Result<u8, i32>) -> Result<u8, i32> {
let x = match into_result(r) {
Err(e) => return from_error(From::from(e)),
Ok(v) => v,
};
Ok(x)
}
fn main() {
id(None);
id_result(Ok(4));
id_try(Ok(4));
}

View File

@ -1,26 +0,0 @@
// skip-filecheck
// Checks that `SimplifyArmIdentity` is not applied if enums have incompatible layouts.
// Regression test for issue #66856.
//
//@ compile-flags: -Zmir-opt-level=3
// EMIT_MIR_FOR_EACH_BIT_WIDTH
//@ ignore-test This pass is broken since deaggregation changed
enum Src {
Foo(u8),
Bar,
}
enum Dst {
Foo(u8),
}
// EMIT_MIR simplify_arm_identity.main.SimplifyArmIdentity.diff
fn main() {
let e: Src = Src::Foo(0);
let _: Dst = match e {
Src::Foo(x) => Dst::Foo(x),
Src::Bar => Dst::Foo(0),
};
}

View File

@ -1,44 +0,0 @@
// skip-filecheck
//@ compile-flags: -Zmir-opt-level=1 -Zunsound-mir-opts
//@ ignore-test
// FIXME: the pass is unsound and causes ICEs in the MIR validator
// EMIT_MIR simplify_try_if_let.{impl#0}-append.SimplifyArmIdentity.diff
use std::ptr::NonNull;
pub struct LinkedList {
head: Option<NonNull<Node>>,
tail: Option<NonNull<Node>>,
}
pub struct Node {
next: Option<NonNull<Node>>,
}
impl LinkedList {
pub fn new() -> Self {
Self { head: None, tail: None }
}
pub fn append(&mut self, other: &mut Self) {
match self.tail {
None => {}
Some(mut tail) => {
// `as_mut` is okay here because we have exclusive access to the entirety
// of both lists.
if let Some(other_head) = other.head.take() {
unsafe {
tail.as_mut().next = Some(other_head);
}
}
}
}
}
}
fn main() {
let mut one = LinkedList::new();
let mut two = LinkedList::new();
one.append(&mut two);
}

View File

@ -1,104 +0,0 @@
- // MIR for `<impl at $DIR/simplify_try_if_let.rs:15:1: 34:2>::append` before SimplifyArmIdentity
+ // MIR for `<impl at $DIR/simplify_try_if_let.rs:15:1: 34:2>::append` after SimplifyArmIdentity
fn <impl at $DIR/simplify_try_if_let.rs:15:1: 34:2>::append(_1: &mut LinkedList, _2: &mut LinkedList) -> () {
debug self => _1; // in scope 0 at $DIR/simplify_try_if_let.rs:20:19: 20:28
debug other => _2; // in scope 0 at $DIR/simplify_try_if_let.rs:20:30: 20:35
let mut _0: (); // return place in scope 0 at $DIR/simplify_try_if_let.rs:20:48: 20:48
let mut _3: isize; // in scope 0 at $DIR/simplify_try_if_let.rs:22:13: 22:17
let mut _4: std::ptr::NonNull<Node>; // in scope 0 at $DIR/simplify_try_if_let.rs:23:18: 23:26
let mut _5: std::option::Option<std::ptr::NonNull<Node>>; // in scope 0 at $DIR/simplify_try_if_let.rs:26:43: 26:60
let mut _6: &mut std::option::Option<std::ptr::NonNull<Node>>; // in scope 0 at $DIR/simplify_try_if_let.rs:26:43: 26:53
let mut _7: isize; // in scope 0 at $DIR/simplify_try_if_let.rs:26:24: 26:40
let mut _9: std::option::Option<std::ptr::NonNull<Node>>; // in scope 0 at $DIR/simplify_try_if_let.rs:28:46: 28:62
let mut _10: std::ptr::NonNull<Node>; // in scope 0 at $DIR/simplify_try_if_let.rs:28:51: 28:61
let mut _11: &mut Node; // in scope 0 at $DIR/simplify_try_if_let.rs:28:25: 28:38
let mut _12: &mut std::ptr::NonNull<Node>; // in scope 0 at $DIR/simplify_try_if_let.rs:28:25: 28:29
scope 1 {
debug tail => _4; // in scope 1 at $DIR/simplify_try_if_let.rs:23:18: 23:26
let _8: std::ptr::NonNull<Node>; // in scope 1 at $DIR/simplify_try_if_let.rs:26:29: 26:39
scope 2 {
- debug other_head => _8; // in scope 2 at $DIR/simplify_try_if_let.rs:26:29: 26:39
+ debug other_head => ((_9 as Some).0: std::ptr::NonNull<Node>); // in scope 2 at $DIR/simplify_try_if_let.rs:26:29: 26:39
scope 3 {
}
}
}
bb0: {
_3 = discriminant(((*_1).1: std::option::Option<std::ptr::NonNull<Node>>)); // scope 0 at $DIR/simplify_try_if_let.rs:22:13: 22:17
switchInt(move _3) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_try_if_let.rs:22:13: 22:17
}
bb1: {
StorageLive(_4); // scope 0 at $DIR/simplify_try_if_let.rs:23:18: 23:26
_4 = ((((*_1).1: std::option::Option<std::ptr::NonNull<Node>>) as Some).0: std::ptr::NonNull<Node>); // scope 0 at $DIR/simplify_try_if_let.rs:23:18: 23:26
StorageLive(_5); // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:60
StorageLive(_6); // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:53
_6 = &mut ((*_2).0: std::option::Option<std::ptr::NonNull<Node>>); // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:53
_5 = Option::<NonNull<Node>>::take(move _6) -> bb4; // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:60
// mir::Constant
// + span: $DIR/simplify_try_if_let.rs:26:54: 26:58
// + literal: Const { ty: for<'r> fn(&'r mut std::option::Option<std::ptr::NonNull<Node>>) -> std::option::Option<std::ptr::NonNull<Node>> {std::option::Option::<std::ptr::NonNull<Node>>::take}, val: Value(Scalar(<ZST>)) }
}
bb2: {
unreachable; // scope 0 at $DIR/simplify_try_if_let.rs:21:15: 21:24
}
bb3: {
_0 = const (); // scope 0 at $DIR/simplify_try_if_let.rs:22:21: 22:24
goto -> bb9; // scope 0 at $DIR/simplify_try_if_let.rs:21:9: 32:10
}
bb4: {
StorageDead(_6); // scope 1 at $DIR/simplify_try_if_let.rs:26:59: 26:60
_7 = discriminant(_5); // scope 1 at $DIR/simplify_try_if_let.rs:26:24: 26:40
switchInt(move _7) -> [1_isize: bb6, otherwise: bb5]; // scope 1 at $DIR/simplify_try_if_let.rs:26:24: 26:40
}
bb5: {
_0 = const (); // scope 1 at $DIR/simplify_try_if_let.rs:26:17: 30:18
goto -> bb8; // scope 1 at $DIR/simplify_try_if_let.rs:26:17: 30:18
}
bb6: {
StorageLive(_8); // scope 1 at $DIR/simplify_try_if_let.rs:26:29: 26:39
_8 = ((_5 as Some).0: std::ptr::NonNull<Node>); // scope 1 at $DIR/simplify_try_if_let.rs:26:29: 26:39
StorageLive(_9); // scope 3 at $DIR/simplify_try_if_let.rs:28:46: 28:62
- StorageLive(_10); // scope 3 at $DIR/simplify_try_if_let.rs:28:51: 28:61
- _10 = _8; // scope 3 at $DIR/simplify_try_if_let.rs:28:51: 28:61
- ((_9 as Some).0: std::ptr::NonNull<Node>) = move _10; // scope 3 at $DIR/simplify_try_if_let.rs:28:46: 28:62
- discriminant(_9) = 1; // scope 3 at $DIR/simplify_try_if_let.rs:28:46: 28:62
- StorageDead(_10); // scope 3 at $DIR/simplify_try_if_let.rs:28:61: 28:62
+ _9 = move _5; // scope 3 at $DIR/simplify_try_if_let.rs:28:46: 28:62
StorageLive(_11); // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:38
StorageLive(_12); // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:29
_12 = &mut _4; // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:29
_11 = NonNull::<Node>::as_mut(move _12) -> bb7; // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:38
// mir::Constant
// + span: $DIR/simplify_try_if_let.rs:28:30: 28:36
// + literal: Const { ty: for<'r> unsafe fn(&'r mut std::ptr::NonNull<Node>) -> &'r mut Node {std::ptr::NonNull::<Node>::as_mut}, val: Value(Scalar(<ZST>)) }
}
bb7: {
StorageDead(_12); // scope 3 at $DIR/simplify_try_if_let.rs:28:37: 28:38
((*_11).0: std::option::Option<std::ptr::NonNull<Node>>) = move _9; // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:62
StorageDead(_9); // scope 3 at $DIR/simplify_try_if_let.rs:28:61: 28:62
StorageDead(_11); // scope 3 at $DIR/simplify_try_if_let.rs:28:62: 28:63
_0 = const (); // scope 3 at $DIR/simplify_try_if_let.rs:27:21: 29:22
StorageDead(_8); // scope 1 at $DIR/simplify_try_if_let.rs:30:17: 30:18
goto -> bb8; // scope 1 at $DIR/simplify_try_if_let.rs:26:17: 30:18
}
bb8: {
StorageDead(_5); // scope 1 at $DIR/simplify_try_if_let.rs:31:13: 31:14
StorageDead(_4); // scope 0 at $DIR/simplify_try_if_let.rs:31:13: 31:14
goto -> bb9; // scope 0 at $DIR/simplify_try_if_let.rs:21:9: 32:10
}
bb9: {
return; // scope 0 at $DIR/simplify_try_if_let.rs:33:6: 33:6
}
}