-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
#[deny]
in expansion of proc macro is ignored
#53975
Comments
This phenomena is currently intentional and a relatively recent change, specifically this code -- Lines 619 to 633 in 780b0c7
which was updated in #52467 |
Interesting. On one hand, I like this change because it means I no longer have to sprinkle On the other hand, I was relying on this to prevent a user error. I have this attribute that turns a function into Ideally, I would be using some feature to make a symbol external regardless of whether is Oh well, I'll write the requirement in bold and just deal with the future "why isn't this working?" questions. Thanks for the info. |
Affects
proc_macro_bang!
and#[proc_macro_attr]
STR
Compiling this code succeeds
$ cargo expand | tail -n9
Compiling the expanded code results in two errors, as expected:
Meta
The name of the expanded function is not a problem. Renaming them to e.g.
foo
andquux
doesn't change the outcome.cc @alexcrichton @petrochenkov apologies if this has already been reported. I didn't search too hard.
The text was updated successfully, but these errors were encountered: