explicit_counter_loop fix #3308 false positive
This commit is contained in:
parent
8b12eee112
commit
c6f79c7ba0
2 changed files with 36 additions and 4 deletions
|
|
@ -1952,10 +1952,7 @@ impl<'a, 'tcx> Visitor<'tcx> for IncrementVisitor<'a, 'tcx> {
|
|||
_ => (),
|
||||
}
|
||||
}
|
||||
} else if is_loop(expr) {
|
||||
walk_expr(self, expr);
|
||||
return;
|
||||
} else if is_conditional(expr) {
|
||||
} else if is_loop(expr) || is_conditional(expr) {
|
||||
self.depth += 1;
|
||||
walk_expr(self, expr);
|
||||
self.depth -= 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue