-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Allow shadowing of procedural macro generated macros #57283
Copy link
Copy link
Closed
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The following expression compiles if
macro_rules! mis generated by a macro_rules macro, but not ifmacro_rules! mis generated by a procedural macro. I believe it should compile in both cases. The invocation ofm!should resolve to the innermost one, as happens for all other types of items.Repro:
src/main.rs
src/lib.rs
Mentioning @petrochenkov who worked on #52841 and fixed #53205.
Mentioning @cramertj who hit this using proc-macro-hack in futures.