rust-lang / rust-lang/rust-clippy
needless_borrowed_reference is too opinionated
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Description
needless_borrowed_reference, newly enabled by default in 1.67 rejects patterns like &(ref x, ref y) and recommends the "match ergonomics" version instead. I intentionally avoid match ergonomics due to the confusion between values and references it introduces when reading code, and I'm not alone in that. By enabling this lint by default, clippy is forcing an unwanted stylistic change and making my code less readable. I would rather not have to go through every single project allowlisting this to unbreak CI, and I particularly don't want to have to do that repeatedly if more opinionated lints are liable to arise.
Version
No response
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 by reviewing the linked Clippy documentation for needless_borrowed_reference and the issue's discussion of its default-enabled status. The payload names no source files, tests, or concrete accepted change; done would require a maintainer decision about the lint's default policy and corresponding project updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100