about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexey Semenyuk <alexsemenyuk88@gmail.com>2024-09-11 12:40:20 +0500
committerAlexey Semenyuk <alexsemenyuk88@gmail.com>2024-09-11 12:40:20 +0500
commit49a501856dd3dc390de7a7ef01ac9c48c13f209c (patch)
tree83971230d2f4db27344d1ff8af1c3f943a12c717
parenta53614a910310130ac75ce15a73a8c4dbd795826 (diff)
downloadrust-49a501856dd3dc390de7a7ef01ac9c48c13f209c.tar.gz
rust-49a501856dd3dc390de7a7ef01ac9c48c13f209c.zip
Fix WHILE_LET_LOOP doc
-rw-r--r--clippy_lints/src/loops/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/clippy_lints/src/loops/mod.rs b/clippy_lints/src/loops/mod.rs
index 92ccc0cc0a1..5155fd76b25 100644
--- a/clippy_lints/src/loops/mod.rs
+++ b/clippy_lints/src/loops/mod.rs
@@ -188,22 +188,22 @@ declare_clippy_lint! {
     /// The `while let` loop is usually shorter and more
     /// readable.
     ///
-    /// ### Known problems
-    /// Sometimes the wrong binding is displayed ([#383](https://github.com/rust-lang/rust-clippy/issues/383)).
-    ///
     /// ### Example
     /// ```rust,no_run
-    /// # let y = Some(1);
+    /// let y = Some(1);
     /// loop {
     ///     let x = match y {
     ///         Some(x) => x,
     ///         None => break,
     ///     };
-    ///     // .. do something with x
+    ///     // ..
     /// }
-    /// // is easier written as
+    /// ```
+    /// Use instead:
+    /// ```rust,no_run
+    /// let y = Some(1);
     /// while let Some(x) = y {
-    ///     // .. do something with x
+    ///     // ..
     /// };
     /// ```
     #[clippy::version = "pre 1.29.0"]