rust-lang / rust-lang/rust-clippy
`search_is_some`: Use a regular visitor instead of `ExprUseVisitor`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Description
When building the suggestion, the lint is unnecessarily using ExprUseVisitor to handle the closure arg's type change. This works currently, but with rust-lang/rust#138961 this will be broken. Using a regular HIR visitor will fix this and be a better match for what the lint wants to do.
Version
Additional Labels
No response
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 at the search_is_some lint and locate where ExprUseVisitor handles the closure argument's type change. Read the surrounding HIR visitor code and the referenced rust-lang/rust#138961 issue before choosing the regular visitor approach. Done means the lint no longer relies on ExprUseVisitor and preserves its suggestion behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100