Show an actionable help text to add a "use ..." on error "cannot find macro" #102601
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
The current output is:
The output should include an actionable help that tells novice users what to do in a way that can be copy/pasted, instead of just specifying which macro to use. Modeling after the error message of a missing type, the missing macro message should look like this (in green):
Same for Derive macros
The same should also be done for the derive macros, e.g. instead of this:
the help message should be
Relevant code
See also the code that generates the message above: compiler/rustc_resolve/src/diagnostics.rs
The text was updated successfully, but these errors were encountered: