File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use rustc_span::sym;
13
13
14
14
declare_clippy_lint ! {
15
15
/// ### What it does
16
- /// Checks for `if` conditions that use blocks containing an
16
+ /// Checks for `if` and `match` conditions that use blocks containing an
17
17
/// expression, statements or conditions that use closures with blocks.
18
18
///
19
19
/// ### Why is this bad?
@@ -25,6 +25,8 @@ declare_clippy_lint! {
25
25
/// if { true } { /* ... */ }
26
26
///
27
27
/// if { let x = somefunc(); x } { /* ... */ }
28
+ ///
29
+ /// match { let e = somefunc(); e } { /* ... */ }
28
30
/// ```
29
31
///
30
32
/// Use instead:
@@ -34,6 +36,9 @@ declare_clippy_lint! {
34
36
///
35
37
/// let res = { let x = somefunc(); x };
36
38
/// if res { /* ... */ }
39
+ ///
40
+ /// let res = { let e = somefunc(); e };
41
+ /// match res { /* ... */ }
37
42
/// ```
38
43
#[ clippy:: version = "1.45.0" ]
39
44
pub BLOCKS_IN_CONDITIONS ,
You can’t perform that action at this time.
0 commit comments