mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
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
1 changed files with 8 additions and 2 deletions
|
@ -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…
Reference in a new issue