Skip to content

Commit 947cbda

Browse files
fix the typo
1 parent 5374688 commit 947cbda

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/rustc_typeck/src/expr_use_visitor.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -498,12 +498,10 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
498498
f(self);
499499
if let Some(els) = els {
500500
// borrowing because we need to test the descriminant
501-
// self.borrow_expr(expr, ImmBorrow);
502-
self.maybe_read_scrutinee(expr, expr_place, from_ref(pat).iter());
501+
self.maybe_read_scrutinee(expr, expr_place.clone(), from_ref(pat).iter());
503502
self.walk_block(els)
504-
} else {
505-
self.walk_irrefutable_pat(&expr_place, &pat);
506503
}
504+
self.walk_irrefutable_pat(&expr_place, &pat);
507505
}
508506

509507
/// Indicates that the value of `blk` will be consumed, meaning either copied or moved

0 commit comments

Comments
 (0)