diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-05-09 15:03:02 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-05-18 13:25:08 -0700 |
| commit | 5e4bac31b82241db4ca8e9234a4f368c30e8966a (patch) | |
| tree | 7d7b6df054b496a337312bceb96da0208efefb25 /src/rustllvm/RustWrapper.cpp | |
| parent | 4208bd5ed8d2b62d151d759bcffec16f98248d53 (diff) | |
| download | rust-5e4bac31b82241db4ca8e9234a4f368c30e8966a.tar.gz rust-5e4bac31b82241db4ca8e9234a4f368c30e8966a.zip | |
rustc: Disallow modules and macros in expansions
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
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
