Using type parameters in trait bounds doesn't count for error[E0392]: "parameter A1
is never used".
#41083
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I have a struct with a bunch of type parameters. Some of them are used for members and some of them are used to nail down the other type parameters.
This uses all five type parameters but still triggers error[E0392] complaining about unused type parameters. I can fix it by adding
phantom: PhantomData<(A1, A2, B)>
, but I believe that shouldn't be necessary.This issue looks related: #35146
And now that I read it again after posting this comment it might even be the same thing. The lack of
where
is something I didn't see before.The text was updated successfully, but these errors were encountered: