5e4bac31b8
This commit feature gates generating modules and macro definitions in procedural macro expansions. Custom derive is exempt from this check as it would be a large retroactive breaking change (#50587). It's hoped that we can hopefully stem the bleeding to figure out a better solution here before opening up the floodgates. The restriction here is specifically targeted at surprising hygiene results [1] that result in non-"copy/paste" behavior. Hygiene and procedural macros is intended to be avoided as much as possible for Macros 1.2 by saying everything is "as if you copy/pasted the code", but modules and macros are sort of weird exceptions to this rule that aren't fully fleshed out. [1]: https://github.com/rust-lang/rust/issues/50504#issuecomment-387734625 cc #50504 |
||
---|---|---|
.. | ||
attr_proc_macro.rs | ||
attr-stmt-expr.rs | ||
attribute-with-error.rs | ||
attributes-included.rs | ||
bang_proc_macro2.rs | ||
bang_proc_macro.rs | ||
derive-a-b.rs | ||
derive-a.rs | ||
derive-b.rs | ||
derive-bad.rs | ||
derive-clona.rs | ||
derive-foo.rs | ||
derive-unstable-2.rs | ||
derive-unstable.rs | ||
issue_38586.rs | ||
issue_50493.rs | ||
issue-41211.rs | ||
more-gates.rs | ||
proc-macro-gates.rs | ||
test-macros.rs |