mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
rustc_expand: use collect_bang helper instead of manual reimplementation
This commit is contained in:
parent
f7801d6c7c
commit
de2940ff63
@ -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!(),
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user