rust-clippy
rust-clippy copied to clipboard
Fix if_let_mutex not checking Mutexes behind refs
Fixes #9193
We can always peel references because we are looking for a method-call, for which autoderef applies.
changelog: [`if_let_mutex`]: detect calls to `Mutex::lock()` if mutex is behind a ref
r? @xFrednet
(rust-highfive has picked a reviewer for you, use r? to override)
While I was at it, I added some labels which point to the offending usages of the same lock, which I think greatly improves the lint-message
changelog: [`if_let_mutex`]: Add labels to the two instances of the same Mutex that will deadlock
@xFrednet LGTM
LGTM to me as well. Thank you for the work and swift responses!
@bors r+
:pushpin: Commit 6de4bdfa8e36bcf5c814b0d43afc1cefb0630533 has been approved by xFrednet
It is now in the queue for this repository.
:hourglass: Testing commit 6de4bdfa8e36bcf5c814b0d43afc1cefb0630533 with merge 0fc95e88f556d3fb95dd92f19a183a30bb5c9688...
:sunny: Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test Approved by: xFrednet Pushing 0fc95e88f556d3fb95dd92f19a183a30bb5c9688 to master...