about summary refs log tree commit diff
path: root/src/libsyntax_ext/deriving/custom.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-04-05 10:49:14 -0500
committerGitHub <noreply@github.com>2018-04-05 10:49:14 -0500
commit46492ffabd7194bb134035cadcd66d47f1b97db8 (patch)
treef361c33cc5f7794ae707b5ed1d60fff877000575 /src/libsyntax_ext/deriving/custom.rs
parentb0bd9a771e81740da7e4a7a2f5a6dfecce10c699 (diff)
parent5d74990cebb82b9573ea6a9d509bb8e05fd6681e (diff)
Rollup merge of #49350 - abonander:macros-in-extern, r=petrochenkov
Expand macros in `extern {}` blocks

This permits macro and proc-macro and attribute invocations (the latter only with the `proc_macro` feature of course) in `extern {}` blocks, gated behind a new `macros_in_extern` feature.

A tracking issue is now open at #49476

closes #48747
Diffstat (limited to 'src/libsyntax_ext/deriving/custom.rs')
-rw-r--r--src/libsyntax_ext/deriving/custom.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax_ext/deriving/custom.rs b/src/libsyntax_ext/deriving/custom.rs
index 80557078d54..5fd5e299488 100644
--- a/src/libsyntax_ext/deriving/custom.rs
+++ b/src/libsyntax_ext/deriving/custom.rs
@@ -55,6 +55,7 @@ impl MultiItemModifier for ProcMacroDerive {
             Annotatable::Item(item) => item,
             Annotatable::ImplItem(_) |
             Annotatable::TraitItem(_) |
+            Annotatable::ForeignItem(_) |
             Annotatable::Stmt(_) |
             Annotatable::Expr(_) => {
                 ecx.span_err(span, "proc-macro derives may only be \