diff options
| author | bors <bors@rust-lang.org> | 2017-03-28 21:10:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-03-28 21:10:07 +0000 |
| commit | 07a34293faeb10757944ce2fa9d552cc2b189583 (patch) | |
| tree | b25508bcd4d999249c34c2a4b751f2ca84d2a072 /src/libsyntax/ext | |
| parent | ccce2c6eb914a66571f60fa0afe8a46faa9fb3bd (diff) | |
| parent | 61928a03564f7bf8201d8a29d5a37efbc64d6712 (diff) | |
| download | rust-07a34293faeb10757944ce2fa9d552cc2b189583.tar.gz rust-07a34293faeb10757944ce2fa9d552cc2b189583.zip | |
Auto merge of #40867 - alexcrichton:rollup, r=alexcrichton
Rollup of 19 pull requests - Successful merges: #40317, #40516, #40524, #40606, #40683, #40751, #40778, #40813, #40818, #40819, #40824, #40828, #40832, #40833, #40837, #40849, #40852, #40853, #40865 - Failed merges:
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/placeholders.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/placeholders.rs b/src/libsyntax/ext/placeholders.rs index f0e328a551d..2d0994a7b78 100644 --- a/src/libsyntax/ext/placeholders.rs +++ b/src/libsyntax/ext/placeholders.rs @@ -106,8 +106,8 @@ impl<'a, 'b> PlaceholderExpander<'a, 'b> { impl<'a, 'b> Folder for PlaceholderExpander<'a, 'b> { fn fold_item(&mut self, item: P<ast::Item>) -> SmallVector<P<ast::Item>> { match item.node { - ast::ItemKind::Mac(ref mac) if !mac.node.path.segments.is_empty() => {} ast::ItemKind::Mac(_) => return self.remove(item.id).make_items(), + ast::ItemKind::MacroDef(_) => return SmallVector::one(item), _ => {} } diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 021c5398a42..66f5520b882 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -119,7 +119,7 @@ fn generic_extension<'cx>(cx: &'cx ExtCtxt, }; let mut p = Parser::new(cx.parse_sess(), tts, Some(directory), false); p.root_module_name = cx.current_expansion.module.mod_path.last() - .map(|id| (*id.name.as_str()).to_owned()); + .map(|id| id.name.as_str().to_string()); p.check_unknown_macro_variable(); // Let the context choose how to interpret the result. |
