mut_range_bound
on immediately broken loop
#7532
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
I tried this code:
I expected this to happen: no diagnostic.
level_count
is mutated for when it is used after the loop, and the loop is immediately broken, so the lack of effect changing the bound has on the number of iterations of the loop is moot.Instead, this happened: the following diagnostic is emitted:
Meta
clippy 0.1.56 (2021-08-03 a6ece56) on playground
The text was updated successfully, but these errors were encountered: