X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_mir%2Fsrc%2Ftransform%2Fsimplify_try.rs;h=89fddc95c98f7802cfdc9f8b555c5300e2588ccf;hb=cc77ba46fcb2d288aa01554b48cd586c5827c3dd;hp=c9c4492062720199bf7d5ed0c63b73d892e7b2ef;hpb=bef3dc5b7f7df3301a86e48cd618f6b1ed80915c;p=rust.git diff --git a/compiler/rustc_mir/src/transform/simplify_try.rs b/compiler/rustc_mir/src/transform/simplify_try.rs index c9c44920627..89fddc95c98 100644 --- a/compiler/rustc_mir/src/transform/simplify_try.rs +++ b/compiler/rustc_mir/src/transform/simplify_try.rs @@ -558,7 +558,7 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { if did_remove_blocks { // We have dead blocks now, so remove those. - simplify::remove_dead_blocks(tcx, body); + simplify::remove_dead_blocks(body); } } } @@ -628,10 +628,7 @@ fn find(&self) -> Vec { // But `asm!(...)` could abort the program, // so we cannot assume that the `unreachable` terminator itself is reachable. // FIXME(Centril): use a normalization pass instead of a check. - || bb.statements.iter().any(|stmt| match stmt.kind { - StatementKind::LlvmInlineAsm(..) => true, - _ => false, - }) + || bb.statements.iter().any(|stmt| matches!(stmt.kind, StatementKind::LlvmInlineAsm(..))) }) .peekable();