Skip to content

Commit 183fade

Browse files
committed
fix: example in blocks_in_conditions lint
Example in blocks_in_conditions lint didn't compile.
1 parent f4eb6bd commit 183fade

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

clippy_lints/src/blocks_in_conditions.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ declare_clippy_lint! {
2626
///
2727
/// if { let x = somefunc(); x } { /* ... */ }
2828
///
29-
/// match { let e = somefunc(); e } { /* ... */ }
29+
/// match { let e = somefunc(); e } {
30+
/// // ...
31+
/// # _ => {}
32+
/// }
3033
/// ```
3134
///
3235
/// Use instead:
@@ -38,7 +41,10 @@ declare_clippy_lint! {
3841
/// if res { /* ... */ }
3942
///
4043
/// let res = { let e = somefunc(); e };
41-
/// match res { /* ... */ }
44+
/// match res {
45+
/// // ...
46+
/// # _ => {}
47+
/// }
4248
/// ```
4349
#[clippy::version = "1.45.0"]
4450
pub BLOCKS_IN_CONDITIONS,

0 commit comments

Comments
 (0)