In impl trait
, E0229 "associated type bindings are not allowed here" could suggest a solution or at least be less confusing
#122162
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
I have been writing Rust for years and still get the syntax for trait generic type params and trait associated types mixed up. In this case, I copy-and-pasted the trait signature from the documentation and put
impl
in front of it.In my mind, I never had any intent to bind an associated type. My goal was to
impl PartialEq
.I now see my mistake, but in this case the error messages did not help me get there and perhaps could be improved.
Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: