diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-11-29 23:36:27 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-12-18 23:26:29 +0000 |
| commit | e80d1a8faf2da8df494828e2772e2d2043282fed (patch) | |
| tree | 423a320eddf2b638d013a6392121841adfe16000 /src/libsyntax/ext/tt | |
| parent | 4d638fd1131c3f909d6e328c20d88e361a444a99 (diff) | |
| download | rust-e80d1a8faf2da8df494828e2772e2d2043282fed.tar.gz rust-e80d1a8faf2da8df494828e2772e2d2043282fed.zip | |
Remove `MacroDef`'s fields `imported_from` and `allow_internal_unstable`,
remove `export` argument of `resolver.add_macro()`.
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index ca18e580ecd..5a028594a21 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -160,14 +160,11 @@ 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, body: tts, - allow_internal_unstable: attr::contains_name(&attrs, "allow_internal_unstable"), attrs: attrs, }; @@ -178,7 +175,7 @@ impl IdentMacroExpander for MacroRulesExpander { MacEager::items(placeholders::macro_scope_placeholder().make_items()) }; - cx.resolver.add_macro(cx.current_expansion.mark, def, export); + cx.resolver.add_macro(cx.current_expansion.mark, def); result } } @@ -282,7 +279,7 @@ pub fn compile(sess: &ParseSess, def: &ast::MacroDef) -> SyntaxExtension { valid: valid, }); - NormalTT(exp, Some(def.span), def.allow_internal_unstable) + NormalTT(exp, Some(def.span), attr::contains_name(&def.attrs, "allow_internal_unstable")) } fn check_lhs_nt_follows(sess: &ParseSess, lhs: &TokenTree) -> bool { |
