-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.I-lang-nominatedNominated for discussion during a lang team meeting.Nominated for discussion during a lang team meeting.L-false-negativeLint: False negative (should have fired but didn't).Lint: False negative (should have fired but didn't).L-unused_parensLint: unused_parensLint: unused_parensT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Description
Code
struct Thing;
impl Thing {
fn method(self) {}
}
fn main() {
let x = Thing;
(x).method();
}Current output
No warningsDesired output
Warn about the unused parentheses around xRationale 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
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.I-lang-nominatedNominated for discussion during a lang team meeting.Nominated for discussion during a lang team meeting.L-false-negativeLint: False negative (should have fired but didn't).Lint: False negative (should have fired but didn't).L-unused_parensLint: unused_parensLint: unused_parensT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team