Skip to content

Commit

Permalink
Keep Known Problems documentation in redundant_pattern_matching
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed May 5, 2021
1 parent f915f8f commit 08454be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clippy_lints/src/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,12 @@ declare_clippy_lint! {
/// **Why is this bad?** It's more concise and clear to just use the proper
/// utility function
///
/// **Known problems:** None.
/// **Known problems:** This will change the drop order for the matched type. Both `if let` and
/// `while let` will drop the value at the end of the block, both `if` and `while` will drop the
/// value before entering the block. For most types this change will not matter, but for a few
/// types this will not be an acceptable change (e.g. locks). See the
/// [reference](https://doc.rust-lang.org/reference/destructors.html#drop-scopes) for more about
/// drop order.
///
/// **Example:**
///
Expand Down

0 comments on commit 08454be

Please sign in to comment.