fix the typo

This commit is contained in:
Ding Xiang Fei 2022-07-12 13:24:08 +02:00
parent 5374688e1d
commit 947cbda5eb
No known key found for this signature in database
GPG Key ID: 3CD748647EEF6359

View File

@ -498,12 +498,10 @@ fn walk_local<F>(
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