Fix ICE with nested macros in certain situations.
This commit is contained in:
parent
49c67bd632
commit
29a052d2d8
2 changed files with 20 additions and 1 deletions
|
|
@ -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),
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue