Diagnostic improvement of macros #97108
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
Playground.
The current output is:
Ideally the output should look like:
The expect error message is written by hand.
The original problem comes from here. It has wasted me a couple of hours to find out the error (a missing
$
in the macro rules), so I hope the diagnostic message can be improved, to avoid another one being stuck by this.If the compiler can not report that I missed a
$
, I hope at least it can report that the next expected token(
doesn't match the actual arguments.The text was updated successfully, but these errors were encountered: