Skip to content

Commit 7c86db4

Browse files
committed
[ mut_range_bound ]: fix doc nits
1 parent 8da5d64 commit 7c86db4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/loops/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,10 @@ declare_clippy_lint! {
356356

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

0 commit comments

Comments
 (0)