Fix let_undescore_lock false-positive when binding without locking

Signed-off-by: Klim Tsoutsman <klimusha@gmail.com>
This commit is contained in:
Klim Tsoutsman 2022-06-13 13:08:50 +10:00 committed by Klim Tsoutsman
parent 6b762ee330
commit 65f700fa89
No known key found for this signature in database
GPG key ID: 65BBCF5B8416C884
4 changed files with 17 additions and 9 deletions

View file

@ -99,12 +99,13 @@ declare_clippy_lint! {
declare_lint_pass!(LetUnderscore => [LET_UNDERSCORE_MUST_USE, LET_UNDERSCORE_LOCK, LET_UNDERSCORE_DROP]);
const SYNC_GUARD_PATHS: [&[&str]; 5] = [
const SYNC_GUARD_PATHS: [&[&str]; 6] = [
&paths::MUTEX_GUARD,
&paths::RWLOCK_READ_GUARD,
&paths::RWLOCK_WRITE_GUARD,
&paths::PARKING_LOT_RAWMUTEX,
&paths::PARKING_LOT_RAWRWLOCK,
&paths::PARKING_LOT_MUTEX_GUARD,
&paths::PARKING_LOT_RWLOCK_READ_GUARD,
&paths::PARKING_LOT_RWLOCK_WRITE_GUARD,
];
impl<'tcx> LateLintPass<'tcx> for LetUnderscore {