Non-last field of generic struct without appropriate trait bound causes confusing hint about dynamically sized field #96810
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.
Given the following code:
The current output is:
Ideally the output should look like:
The wrong hint was reproduced in both stable and nightly.
Removing
a: u32
ceases the wrong hint, so this seems to be an issue for non-last field.Replacing
T::Assoc
withT
also gets rid of the misleading suggestion, which implies that this issue is related to associated types.The text was updated successfully, but these errors were encountered: