Confusing diagnostics on #[derive(X)] when X is imported only as trait #88206
Labels
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
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.
Reported by @Hoverbear here: https://twitter.com/a_hoverbear/status/1428763621572501507
Output:
The diagnostics shows that
Serialize
is not found, and then complains thatSerialize
was imported and unused. Confusing.(Only the trait
Serialize
is imported, not theSerialize
derive macro, as thederive
feature wasn't enabled onserde
.)The text was updated successfully, but these errors were encountered: