File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -424,7 +424,12 @@ declare_clippy_lint! {
424424 /// **Why is this bad?** It's more concise and clear to just use the proper
425425 /// utility function
426426 ///
427- /// **Known problems:** None.
427+ /// **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.
428433 ///
429434 /// **Example:**
430435 ///
You can’t perform that action at this time.
0 commit comments