Skip to content

Commit c23f31c

Browse files
deconstruct
1 parent cdeaff9 commit c23f31c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_middle/src/thir/visit.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn walk_expr<'thir, 'tcx: 'thir, V: Visitor<'thir, 'tcx>>(
4242
) {
4343
use ExprKind::*;
4444
let Expr { kind, ty: _, temp_lifetime: _, span: _ } = expr;
45-
match kind {
45+
match *kind {
4646
Scope { value, region_scope: _, lint_level: _ } => {
4747
visitor.visit_expr(&visitor.thir()[value])
4848
}
@@ -225,7 +225,7 @@ pub fn walk_block<'thir, 'tcx: 'thir, V: Visitor<'thir, 'tcx>>(
225225
visitor.visit_stmt(&visitor.thir()[stmt]);
226226
}
227227
if let Some(expr) = expr {
228-
visitor.visit_expr(&visitor.thir()[expr]);
228+
visitor.visit_expr(&visitor.thir()[*expr]);
229229
}
230230
}
231231

@@ -235,10 +235,10 @@ pub fn walk_arm<'thir, 'tcx: 'thir, V: Visitor<'thir, 'tcx>>(
235235
) {
236236
let Arm { guard, pattern, body, lint_level: _, span: _, scope: _ } = arm;
237237
if let Some(expr) = guard {
238-
visitor.visit_expr(&visitor.thir()[expr])
238+
visitor.visit_expr(&visitor.thir()[*expr])
239239
}
240240
visitor.visit_pat(pattern);
241-
visitor.visit_expr(&visitor.thir()[body]);
241+
visitor.visit_expr(&visitor.thir()[*body]);
242242
}
243243

244244
pub fn walk_pat<'thir, 'tcx: 'thir, V: Visitor<'thir, 'tcx>>(

0 commit comments

Comments
 (0)