Skip to content

Commit 78bdd45

Browse files
committed
Auto merge of rust-lang#13379 - alex-semenyuk:while_let_loop_fix_document, r=dswij
Fix doc for `while_let_loop` Fix doc for `while_let_loop` changelog: none
2 parents a53614a + 49a5018 commit 78bdd45

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clippy_lints/src/loops/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,22 @@ declare_clippy_lint! {
188188
/// The `while let` loop is usually shorter and more
189189
/// readable.
190190
///
191-
/// ### Known problems
192-
/// Sometimes the wrong binding is displayed ([#383](https://github.com/rust-lang/rust-clippy/issues/383)).
193-
///
194191
/// ### Example
195192
/// ```rust,no_run
196-
/// # let y = Some(1);
193+
/// let y = Some(1);
197194
/// loop {
198195
/// let x = match y {
199196
/// Some(x) => x,
200197
/// None => break,
201198
/// };
202-
/// // .. do something with x
199+
/// // ..
203200
/// }
204-
/// // is easier written as
201+
/// ```
202+
/// Use instead:
203+
/// ```rust,no_run
204+
/// let y = Some(1);
205205
/// while let Some(x) = y {
206-
/// // .. do something with x
206+
/// // ..
207207
/// };
208208
/// ```
209209
#[clippy::version = "pre 1.29.0"]

0 commit comments

Comments
 (0)