fix: example in blocks_in_conditions lint
Example in blocks_in_conditions lint didn't compile.
This commit is contained in:
parent
f4eb6bd709
commit
183fade0ef
@ -26,7 +26,10 @@ declare_clippy_lint! {
|
||||
///
|
||||
/// if { let x = somefunc(); x } { /* ... */ }
|
||||
///
|
||||
/// match { let e = somefunc(); e } { /* ... */ }
|
||||
/// match { let e = somefunc(); e } {
|
||||
/// // ...
|
||||
/// # _ => {}
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
@ -38,7 +41,10 @@ declare_clippy_lint! {
|
||||
/// if res { /* ... */ }
|
||||
///
|
||||
/// let res = { let e = somefunc(); e };
|
||||
/// match res { /* ... */ }
|
||||
/// match res {
|
||||
/// // ...
|
||||
/// # _ => {}
|
||||
/// }
|
||||
/// ```
|
||||
#[clippy::version = "1.45.0"]
|
||||
pub BLOCKS_IN_CONDITIONS,
|
||||
|
Loading…
x
Reference in New Issue
Block a user