-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Using Macros 2.0 to generate a module does not allow access to items #47797
Comments
Thanks! I believe this is a duplicate of #46342. The macro foo($mod_name:ident, $bar:ident) {
pub mod $mod_name {
pub const $bar: u32 = 1;
}
}
foo!(FooMod, BAR); |
@dtolnay Ah okay, thanks. Looks like we need hygiene opt-out desperately. Do you know the state of that? |
Yep the hygiene opt-out is tracked in #39412 where it talks about "hygiene bending". |
alexreg
changed the title
Using macro 2.0 to generate a module does not allow access to items
Using Macros 2.0 to generate a module does not allow access to items
Feb 3, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see no reason why the following code shouldn't work on the latest nightly,
yet I get an odd error.
Perhaps I'm missing something about how hygiene works in macros 2.0?
The text was updated successfully, but these errors were encountered: