From 1d5accabf1ae1d546f03e8776f0b0c36e14c70a7 Mon Sep 17 00:00:00 2001 From: Smitty Date: Thu, 17 Jun 2021 10:15:02 -0400 Subject: [PATCH] simplify borrowing --- compiler/rustc_mir_build/src/thir/visit.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_mir_build/src/thir/visit.rs b/compiler/rustc_mir_build/src/thir/visit.rs index 0f3276a1b05..8f7e3aff11f 100644 --- a/compiler/rustc_mir_build/src/thir/visit.rs +++ b/compiler/rustc_mir_build/src/thir/visit.rs @@ -146,19 +146,19 @@ pub fn walk_expr<'a, 'tcx: 'a, V: Visitor<'a, 'tcx>>(visitor: &mut V, expr: &Exp } pub fn walk_stmt<'a, 'tcx: 'a, V: Visitor<'a, 'tcx>>(visitor: &mut V, stmt: &Stmt<'tcx>) { - match &stmt.kind { - StmtKind::Expr { expr, scope: _ } => visitor.visit_expr(&visitor.thir()[*expr]), + match stmt.kind { + StmtKind::Expr { expr, scope: _ } => visitor.visit_expr(&visitor.thir()[expr]), StmtKind::Let { initializer, remainder_scope: _, init_scope: _, - pattern, + ref pattern, lint_level: _, } => { if let Some(init) = initializer { - visitor.visit_expr(&visitor.thir()[*init]); + visitor.visit_expr(&visitor.thir()[init]); } - visitor.visit_pat(&pattern); + visitor.visit_pat(pattern); } } }