-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
misleading E0392 "parameter T is never used" for every containing struct #66912
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Rustc emits an error for every struct containing a struct with an unused type parameter. Unless there's some edge case I'm not thinking of, this seems pointless, as the user will eventually have to fix the "leaf" struct (that which is the root of the problem), which would then fix the entire tree of structs.
I tried this code:
I expected to see this happen:
Instead, this happened:
Meta
rustc --version --verbose:rustc 1.41.0-nightly (25d8a94 2019-11-29)
binary: rustc
commit-hash: 25d8a94
commit-date: 2019-11-29
host: x86_64-unknown-linux-gnu
release: 1.41.0-nightly
LLVM version: 9.0