From 53de24bbd1b87cf37457568f67c2b483f196de9b Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Wed, 19 Oct 2016 06:51:40 +0000 Subject: Refactor away fields `MacroDef::{use_locally, export}`. --- src/libsyntax/ext/tt/macro_rules.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/ext/tt') diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 61911e0d3b3..ceca698f479 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -157,14 +157,13 @@ impl IdentMacroExpander for MacroRulesExpander { tts: Vec, attrs: Vec) -> Box { + let export = attr::contains_name(&attrs, "macro_export"); let def = ast::MacroDef { ident: ident, id: ast::DUMMY_NODE_ID, span: span, imported_from: None, - use_locally: true, body: tts, - export: attr::contains_name(&attrs, "macro_export"), allow_internal_unstable: attr::contains_name(&attrs, "allow_internal_unstable"), attrs: attrs, }; @@ -176,7 +175,7 @@ impl IdentMacroExpander for MacroRulesExpander { MacEager::items(placeholders::macro_scope_placeholder().make_items()) }; - cx.resolver.add_macro(cx.current_expansion.mark, def); + cx.resolver.add_macro(cx.current_expansion.mark, def, export); result } } -- cgit 1.4.1-3-g733a5