Skip to content

Commit 9925082

Browse files
Miscellaneous cleanup
1 parent c562caf commit 9925082

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc_mir_build/build/block.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
7878

7979
let source_info = this.source_info(span);
8080
for stmt in stmts {
81+
debug!("ast_block_stmt({:?})", stmt);
82+
8183
let Stmt { kind, opt_destruction_scope } = this.hir.mirror(stmt);
8284
match kind {
8385
StmtKind::Expr { scope, expr } => {
@@ -96,8 +98,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
9698
);
9799
}
98100
StmtKind::Let { remainder_scope, init_scope, pattern, initializer, lint_level } => {
99-
let ignores_expr_result =
100-
if let PatKind::Wild = *pattern.kind { true } else { false };
101+
let ignores_expr_result = matches!(*pattern.kind, PatKind::Wild);
101102
this.block_context.push(BlockFrame::Statement { ignores_expr_result });
102103

103104
// Enter the remainder scope, i.e., the bindings' destruction scope.

0 commit comments

Comments
 (0)