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
This commit is contained in:
@@ -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",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user