Skip to content

Commit 1d5acca

Browse files
committed
simplify borrowing
1 parent 210e46b commit 1d5acca

File tree

1 file changed

+5
-5
lines changed
  • compiler/rustc_mir_build/src/thir

1 file changed

+5
-5
lines changed

compiler/rustc_mir_build/src/thir/visit.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ pub fn walk_expr<'a, 'tcx: 'a, V: Visitor<'a, 'tcx>>(visitor: &mut V, expr: &Exp
146146
}
147147

148148
pub fn walk_stmt<'a, 'tcx: 'a, V: Visitor<'a, 'tcx>>(visitor: &mut V, stmt: &Stmt<'tcx>) {
149-
match &stmt.kind {
150-
StmtKind::Expr { expr, scope: _ } => visitor.visit_expr(&visitor.thir()[*expr]),
149+
match stmt.kind {
150+
StmtKind::Expr { expr, scope: _ } => visitor.visit_expr(&visitor.thir()[expr]),
151151
StmtKind::Let {
152152
initializer,
153153
remainder_scope: _,
154154
init_scope: _,
155-
pattern,
155+
ref pattern,
156156
lint_level: _,
157157
} => {
158158
if let Some(init) = initializer {
159-
visitor.visit_expr(&visitor.thir()[*init]);
159+
visitor.visit_expr(&visitor.thir()[init]);
160160
}
161-
visitor.visit_pat(&pattern);
161+
visitor.visit_pat(pattern);
162162
}
163163
}
164164
}

0 commit comments

Comments
 (0)