-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
C-an-interesting-projectCategory: Interesting projects, that usually are more involved design/code wise.Category: Interesting projects, that usually are more involved design/code wise.C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages
Description
Description
#[clippy::has_significant_drop] was added for the lint clippy::significant_drop_in_scrutinee.
The clippy::let_underscore_lock currently uses a hardcoded list of type paths to lint against:
rust-clippy/clippy_lints/src/let_underscore.rs
Lines 108 to 114 in a98e7ab
| const SYNC_GUARD_PATHS: [&[&str]; 5] = [ | |
| &paths::MUTEX_GUARD, | |
| &paths::RWLOCK_READ_GUARD, | |
| &paths::RWLOCK_WRITE_GUARD, | |
| &paths::PARKING_LOT_RAWMUTEX, | |
| &paths::PARKING_LOT_RAWRWLOCK, | |
| ]; |
Instead, it should use the presence of the new #[clippy::has_significant_drop] attribute.
Checking for the parking_lot types by path might need to stay around for a while until most parking_lot consumers are using a version with the #[clippy::has_significant_drop] attribute.
Version
git master
Additional Labels
@rustbot label +C-enhancement +C-an-interesting-project
(I guess)
estebank and mo8it
Metadata
Metadata
Assignees
Labels
C-an-interesting-projectCategory: Interesting projects, that usually are more involved design/code wise.Category: Interesting projects, that usually are more involved design/code wise.C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messages