Fix #1219 false positive for explicit_counter_loop

This commit is contained in:
Josh Mcguigan 2018-09-07 19:58:19 -07:00
parent ce554267b8
commit 53c262048c
3 changed files with 21 additions and 1 deletions

View file

@ -1950,6 +1950,9 @@ impl<'a, 'tcx> Visitor<'tcx> for IncrementVisitor<'a, 'tcx> {
walk_expr(self, expr);
self.depth -= 1;
return;
} else if let ExprKind::Continue(_) = expr.node {
self.done = true;
return;
}
walk_expr(self, expr);
}