rust/src/test/compile-fail-fulldeps/proc-macro/auxiliary
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
..
attr_proc_macro.rs Implement #[proc_macro_attribute] 2017-01-16 22:41:22 -08:00
attr-stmt-expr.rs Expand attribute macros on statements and expressions. 2018-04-02 01:56:12 -07:00
attribute-with-error.rs Add a failing test for errors in proc macros 2017-07-28 07:58:20 -07:00
attributes-included.rs TokenTree: Op -> Punct, Term -> Ident 2018-05-15 23:24:16 +03:00
bang_proc_macro2.rs Reintroduce expansion info for proc macros 1.1 2017-07-12 09:47:04 +02:00
bang_proc_macro.rs Implement function-like procedural macros ( #[proc_macro]) 2017-02-28 18:34:22 -08:00
derive-a-b.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
derive-a.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
derive-b.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
derive-bad.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
derive-clona.rs Refactor macro resolution errors + add derive macro suggestions 2017-02-16 22:03:15 +10:30
derive-foo.rs Refactor macro resolution errors + add derive macro suggestions 2017-02-16 22:03:15 +10:30
derive-unstable-2.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
derive-unstable.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_50493.rs typeck: Save the index of private fields 2018-05-14 01:28:15 +00: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
more-gates.rs rustc: Disallow modules and macros in expansions 2018-05-18 13:25:08 -07:00
proc-macro-gates.rs rustc: Tweak custom attribute capabilities 2018-04-20 19:56:16 -07:00
test-macros.rs expand macro invocations in extern {} blocks 2018-04-03 13:16:11 -07:00