`unused_parens` does not lint parentheses around method receiver
Open
Nobody has claimed this yet.
A-diagnostics
A-lints
I-lang-radar
L-false-negative
L-unused_parens
T-compiler
T-lang
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
struct Thing;
impl Thing {
fn method(self) {}
}
fn main() {
let x = Thing;
(x).method();
}
Current output
No warnings
Desired output
Warn about the unused parentheses around x
Rationale and extra context
No response
Other cases
Rust Version
Reproducible on the playground with version 1.95.0-nightly (2026-01-30 a293cc4af8b26701c427)
Anything else?
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 reproducing the provided Rust playground example and tracing the unused_parens lint entry point in the compiler. The work is done when parentheses around a method receiver such as (x).method() produce a warning, with coverage for the shown case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100