Skip to content

Commit

Permalink
fix: example in blocks_in_conditions lint
Browse files Browse the repository at this point in the history
Example in blocks_in_conditions lint didn't compile.
  • Loading branch information
kaffarell committed Feb 15, 2024
1 parent f4eb6bd commit 183fade
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions clippy_lints/src/blocks_in_conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ declare_clippy_lint! {
///
/// if { let x = somefunc(); x } { /* ... */ }
///
/// match { let e = somefunc(); e } { /* ... */ }
/// match { let e = somefunc(); e } {
/// // ...
/// # _ => {}
/// }
/// ```
///
/// Use instead:
Expand All @@ -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,
Expand Down

0 comments on commit 183fade

Please sign in to comment.