rust/src/test/compile-fail-fulldeps/proc-macro
Alex Crichton 5e4bac31b8 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
2018-05-18 13:25:08 -07:00
..
auxiliary rustc: Disallow modules and macros in expansions 2018-05-18 13:25:08 -07:00
attr-invalid-exprs.rs rustc: Tweak custom attribute capabilities 2018-04-20 19:56:16 -07:00
attr-stmt-expr.rs rustc: Tweak custom attribute capabilities 2018-04-20 19:56:16 -07:00
attribute-with-error.rs proc_macro: Stay on the "use the cache" path more 2018-04-18 19:36:48 -07:00
attribute.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
attributes-included.rs rustc: Tweak custom attribute capabilities 2018-04-20 19:56:16 -07:00
define-two.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
derive-bad.rs Fix proc_macro output with struct parse error 2017-11-25 10:13:15 -08:00
derive-still-gated.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
expand-to-unstable-2.rs Ignore tests that fail on stage1 2017-08-08 18:33:43 +02:00
expand-to-unstable.rs Ignore tests that fail on stage1 2017-08-08 18:33:43 +02:00
export-macro.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
exports.rs rustc: Rename rustc_macro to proc_macro 2016-10-06 11:07:23 -07:00
feature-gate-proc_macro.rs Remove some needless // gate-test- comments 2017-05-23 20:17:38 +02:00
illegal-proc-macro-derive-use.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
import.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
issue-37788.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
issue-38586.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
issue-41211.rs Don't panic if an attribute macro fails to resolve at crate root 2017-04-20 16:13:13 -07:00
issue-50493.rs typeck: Save the index of private fields 2018-05-14 01:28:15 +00:00
item-error.rs Ignore tests that fail on stage1 2017-08-08 18:33:43 +02:00
lints_in_proc_macros.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
macro-use-attr.rs Implement #[proc_macro_attribute] 2017-01-16 22:41:22 -08:00
macro-use-bang.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
macros-in-extern.rs expand macro invocations in extern {} blocks 2018-04-03 13:16:11 -07:00
more-gates.rs rustc: Disallow modules and macros in expansions 2018-05-18 13:25:08 -07:00
no-macro-use-attr.rs Rename CustomDerive to ProcMacroDerive for macros 1.1 2017-02-05 09:31:02 +10:30
proc-macro-attributes.rs Ignore tests that fail on stage1 2017-08-08 18:33:43 +02:00
proc-macro-custom-attr-mutex.rs Implement #[proc_macro_attribute] 2017-01-16 22:41:22 -08:00
proc-macro-gates.rs rustc: Disallow modules and macros in expansions 2018-05-18 13:25:08 -07:00
proc-macro-gates2.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
pub-at-crate-root.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
shadow-builtin.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
shadow.rs Clearer Error Message for Duplicate Definition 2017-06-15 08:21:17 -07:00
two-crate-types-1.rs rustc: Rename rustc_macro to proc_macro 2016-10-06 11:07:23 -07:00
two-crate-types-2.rs rustc: Rename rustc_macro to proc_macro 2016-10-06 11:07:23 -07:00