Skip to content

Nested macros can't define any new variables #26329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
reem opened this issue Jun 16, 2015 · 3 comments
Closed

Nested macros can't define any new variables #26329

reem opened this issue Jun 16, 2015 · 3 comments
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

Comments

@reem
Copy link
Contributor

reem commented Jun 16, 2015

Example: http://is.gd/9LFIF2

The outer macro attempts to parse the new variables as existing ones, and errors when it can't find them.

@steveklabnik steveklabnik added the A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) label Jun 23, 2015
@mitsuhiko
Copy link
Contributor

I just ran into this. Very annoying issue. If it's too hard to make the identity nesting work it would be possible to just use $$ to refer to nested variables (with added repetition at each new level).

@mitsuhiko
Copy link
Contributor

This seems to be a duplicate of #6994.

@alexcrichton
Copy link
Member

Thanks for the reference @mitsuhiko!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
Projects
None yet
Development

No branches or pull requests

4 participants