diff --git a/clippy_lints/src/loops/mod.rs b/clippy_lints/src/loops/mod.rs index 391de922e1e..fa7a8b10033 100644 --- a/clippy_lints/src/loops/mod.rs +++ b/clippy_lints/src/loops/mod.rs @@ -346,7 +346,14 @@ declare_clippy_lint! { /// /// ### Example /// ```ignore - /// while let Some(val) = iter() { + /// while let Some(val) = iter.next() { + /// .. + /// } + /// ``` + /// + /// Use instead: + /// ```ignore + /// for val in &mut iter { /// .. /// } /// ```