mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
Auto merge of #5738 - mikerite:loops-20200623-2, r=matthiaskrgr
Improve end of expression check in for loop lints changelog: none
This commit is contained in:
commit
c420382ac2
1 changed files with 1 additions and 1 deletions
|
@ -2042,7 +2042,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InitializeVisitor<'a, 'tcx> {
|
|||
if self.state == VarState::DontWarn {
|
||||
return;
|
||||
}
|
||||
if SpanlessEq::new(self.cx).eq_expr(&expr, self.end_expr) {
|
||||
if expr.hir_id == self.end_expr.hir_id {
|
||||
self.past_loop = true;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue