File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -188,22 +188,22 @@ declare_clippy_lint! {
188
188
/// The `while let` loop is usually shorter and more
189
189
/// readable.
190
190
///
191
- /// ### Known problems
192
- /// Sometimes the wrong binding is displayed ([#383](https://github.com/rust-lang/rust-clippy/issues/383)).
193
- ///
194
191
/// ### Example
195
192
/// ```rust,no_run
196
- /// # let y = Some(1);
193
+ /// let y = Some(1);
197
194
/// loop {
198
195
/// let x = match y {
199
196
/// Some(x) => x,
200
197
/// None => break,
201
198
/// };
202
- /// // .. do something with x
199
+ /// // ..
203
200
/// }
204
- /// // is easier written as
201
+ /// ```
202
+ /// Use instead:
203
+ /// ```rust,no_run
204
+ /// let y = Some(1);
205
205
/// while let Some(x) = y {
206
- /// // .. do something with x
206
+ /// // ..
207
207
/// };
208
208
/// ```
209
209
#[ clippy:: version = "pre 1.29.0" ]
You can’t perform that action at this time.
0 commit comments