diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-09-08 01:42:12 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-12-28 11:42:26 +0300 |
| commit | e3155abd2efd5d07a8bc323b1ea0a915616c7ae0 (patch) | |
| tree | c253e73f99edc0eaef0b586bcc44c1b4206b71ea /src/libsyntax_expand | |
| parent | 3a087ad3a924be12343bb035bf9b63ed81f650bf (diff) | |
Stabilize attribute macros on inline modules
Diffstat (limited to 'src/libsyntax_expand')
| -rw-r--r-- | src/libsyntax_expand/expand.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libsyntax_expand/expand.rs b/src/libsyntax_expand/expand.rs index b9b449d1779..4f6f88a753b 100644 --- a/src/libsyntax_expand/expand.rs +++ b/src/libsyntax_expand/expand.rs @@ -717,13 +717,10 @@ impl<'a, 'b> MacroExpander<'a, 'b> { fn gate_proc_macro_attr_item(&self, span: Span, item: &Annotatable) { let kind = match item { - Annotatable::Item(item) => match &item.kind { - ItemKind::Mod(m) if m.inline => "modules", - _ => return, - }, - Annotatable::TraitItem(_) | Annotatable::ImplItem(_) | Annotatable::ForeignItem(_) => { - return; - } + Annotatable::Item(_) + | Annotatable::TraitItem(_) + | Annotatable::ImplItem(_) + | Annotatable::ForeignItem(_) => return, Annotatable::Stmt(_) => "statements", Annotatable::Expr(_) => "expressions", Annotatable::Arm(..) |
