Closed
Description
I got this error message recently:
error: unused variable: `kind`
--> compiler/rustc_expand/src/mbe/macro_parser.rs:700:59
|
700 | if let &MatcherLoc::MetaVarDecl { span, bind, kind, .. } = loc {
| ^^^^ help: try ignoring the field: `kind: _`
|
= note: `-D unused-variables` implied by `-D warnings`
kind: _
will work, but just removing kind
completely from the pattern would be better.
E.g. the suggestion could be help: try removing the field
.
The particular example was within rustc, but it should be very easy to replicate in a self-contained example.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsDiagnostics: An error or lint that needs small tweaks.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.