Skip to content

Commit

Permalink
fix the typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiangfei2009 committed Jul 12, 2022
1 parent 5374688 commit 947cbda
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions compiler/rustc_typeck/src/expr_use_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,10 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
f(self);
if let Some(els) = els {
// borrowing because we need to test the descriminant
// self.borrow_expr(expr, ImmBorrow);
self.maybe_read_scrutinee(expr, expr_place, from_ref(pat).iter());
self.maybe_read_scrutinee(expr, expr_place.clone(), from_ref(pat).iter());
self.walk_block(els)
} else {
self.walk_irrefutable_pat(&expr_place, &pat);
}
self.walk_irrefutable_pat(&expr_place, &pat);
}

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

0 comments on commit 947cbda

Please sign in to comment.