Non-found macro_rules!
should suggest moving if they actually exist in the same file
#121061
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
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
Often times,
can be apart and/or soaked in other errors. Due to this, it might be desirable to couple a help message addressing this specific situation of a later definition.
This might also be useful advice for beginners who are just starting out with Rust and might not be aware of the horrors of declarative macros using
macro_rules!
, and as such could appreciate a helping hand by the compiler here.Other cases
No response
Rust Version
Anything else?
I tried to keep the suggested output close to the one for similarly named macros/variables, but that might not be applicable here and instead deserve its own section under the code excerpt. Open for bikeshedding. Like all of this, actually. Hmm.
(The message is the same on nightly b381d3a 2024-02-12.)
The text was updated successfully, but these errors were encountered: