-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleL-unused_qualificationsLint: unused_qualificationsLint: unused_qualificationsT-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.
Description
Code
See here:
(After enabling unused_qualifications = "warn" via Cargo.toml.)
Current output
warning: unnecessary qualification
--> crates/proto/src/multicast/mdns_stream.rs:456:9
|
456 | if let Err(error) = result {
| ^^
|
= note: requested on the command line with `-W unused-qualifications`
warning: `hickory-proto` (lib test) generated 1 warning (run `cargo fix --lib -p hickory-proto --tests` to apply 1 suggestion)Desired output
No warning.Rationale and extra context
Clearly the lint should not fire on language keywords.
Other cases
Rust Version
rustc 1.92.0 (ded5c06cf 2025-12-08)
binary: rustc
commit-hash: ded5c06cf21d2b93bffd5d884aa6e96934ee4234
commit-date: 2025-12-08
host: aarch64-apple-darwin
release: 1.92.0
LLVM version: 21.1.3Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleL-unused_qualificationsLint: unused_qualificationsLint: unused_qualificationsT-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.