diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-10-19 06:51:40 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-10-24 00:43:19 +0000 |
| commit | 53de24bbd1b87cf37457568f67c2b483f196de9b (patch) | |
| tree | 27b9a67951665a29f08322e7e2beb98da97bcfb0 /src/libsyntax/ext/tt | |
| parent | e4baeaa30da3736d9a85f24509319d7148c2feea (diff) | |
Refactor away fields `MacroDef::{use_locally, export}`.
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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<tokenstream::TokenTree>, attrs: Vec<ast::Attribute>) -> Box<MacResult> { + 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 } } |
