about summary refs log tree commit diff
path: root/src/libsyntax/ast.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/ast.rs
parentb0bd9a771e81740da7e4a7a2f5a6dfecce10c699 (diff)
parent5d74990cebb82b9573ea6a9d509bb8e05fd6681e (diff)
downloadrust-46492ffabd7194bb134035cadcd66d47f1b97db8.tar.gz
rust-46492ffabd7194bb134035cadcd66d47f1b97db8.zip
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/ast.rs')
-rw-r--r--src/libsyntax/ast.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 31bb1c88b87..9d0c85a34f9 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -2192,6 +2192,8 @@ pub enum ForeignItemKind {
     Static(P<Ty>, bool),
     /// A foreign type
     Ty,
+    /// A macro invocation
+    Macro(Mac),
 }
 
 impl ForeignItemKind {
@@ -2200,6 +2202,7 @@ impl ForeignItemKind {
             ForeignItemKind::Fn(..) => "foreign function",
             ForeignItemKind::Static(..) => "foreign static item",
             ForeignItemKind::Ty => "foreign type",
+            ForeignItemKind::Macro(..) => "macro in foreign module",
         }
     }
 }