Skip to content

Commit

Permalink
[ mut_range_bound ]: fix doc nits
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfield committed Jun 6, 2024
1 parent 8da5d64 commit 7c86db4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/loops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ declare_clippy_lint! {

declare_clippy_lint! {
/// ### What it does
/// Checks for loops which have a range bound that is a mutable variable
/// Checks for loops with a range bound that is a mutable variable.
///
/// ### Why is this bad?
/// One might think that modifying the mutable variable changes the loop bounds
/// One might think that modifying the mutable variable changes the loop bounds. It doesn't.
///
/// ### Known problems
/// False positive when mutation is followed by a `break`, but the `break` is not immediately
Expand All @@ -381,7 +381,7 @@ declare_clippy_lint! {
/// let mut foo = 42;
/// for i in 0..foo {
/// foo -= 1;
/// println!("{}", i); // prints numbers from 0 to 42, not 0 to 21
/// println!("{i}"); // prints numbers from 0 to 41, not 0 to 21
/// }
/// ```
#[clippy::version = "pre 1.29.0"]
Expand Down

0 comments on commit 7c86db4

Please sign in to comment.