-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Unhelpful error message in macros which invoke other macros #35150
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The problematic code:
Rustc output:
Playpen link
This error points out that the
y!macro performed an incorrect invocation of thex!macro, but fails to point out whichx!macro in particular it is trying to invoke, or the location where they!macro was invoked. In addition, it doesn't point out tokens which the macro would accept (in this case, the end of the invocation).