Skip to content

Commit

Permalink
Rollup merge of rust-lang#78794 - est31:collect_bang, r=oli-obk
Browse files Browse the repository at this point in the history
rustc_expand: use collect_bang helper instead of manual reimplementation
  • Loading branch information
JohnTitor authored Nov 6, 2020
2 parents 821f92b + de2940f commit fc1aa2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1436,9 +1436,9 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
item.attrs = attrs;
self.check_attributes(&item.attrs);
item.and_then(|item| match item.kind {
ItemKind::MacCall(mac) => self
.collect(AstFragmentKind::Items, InvocationKind::Bang { mac, span })
.make_items(),
ItemKind::MacCall(mac) => {
self.collect_bang(mac, span, AstFragmentKind::Items).make_items()
}
_ => unreachable!(),
})
}
Expand Down

0 comments on commit fc1aa2e

Please sign in to comment.