rust-lang / rust-lang/rust-clippy
lint variable assignments that could be part of a method/field chain
Open
Nobody has claimed this yet.
A-lint
good first issue
L-unnecessary
T-middle
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
let x = foo.bar;
let y = x.met();
Should be
let y = foo.bar.met();
If x is not used anywhere else
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 by reviewing rust-clippy's existing lint implementations for variable assignments and method or field chains. Determine how to identify assignments whose value is used only by the next chain expression, then add coverage for the examples in the issue and verify that assignments used elsewhere are not flagged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100