We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f915f8f commit 08454beCopy full SHA for 08454be
clippy_lints/src/matches.rs
@@ -424,7 +424,12 @@ declare_clippy_lint! {
424
/// **Why is this bad?** It's more concise and clear to just use the proper
425
/// utility function
426
///
427
- /// **Known problems:** None.
+ /// **Known problems:** This will change the drop order for the matched type. Both `if let` and
428
+ /// `while let` will drop the value at the end of the block, both `if` and `while` will drop the
429
+ /// value before entering the block. For most types this change will not matter, but for a few
430
+ /// types this will not be an acceptable change (e.g. locks). See the
431
+ /// [reference](https://doc.rust-lang.org/reference/destructors.html#drop-scopes) for more about
432
+ /// drop order.
433
434
/// **Example:**
435
0 commit comments