Suggest a code fix when an attribute macro is incorrectly used as a derive macro #109589
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
(The actual desired output should have colours and minuses on the removed derive, but to give the idea)
Rationale and extra context
Many users are not familiar with the terminology being used by the compiler error (i.e. the different flavours of procedural macro, derive vs attribute) and might be confused as to what they need to do in order to fix the error.
Since the fix is straight-forward (i.e. remove the
derive
), the compiler should show a code snippet that fixes the issue.Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: