rust-lang / rust-lang/rust-clippy
clippy::let_underscore_lock lint should use #[clippy::has_significant_drop] attribute rather than a hardcoded list
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
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:
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in clippy_lints/src/let_underscore.rs around the hardcoded type-path list and trace how the clippy::has_significant_drop attribute is handled by the related significant_drop_in_scrutinee lint. Replace the primary hardcoded check with attribute detection while retaining the parking_lot path fallback described in the issue, then verify both detection paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100