Skip to content

Commit de2940f

Browse files
committed
rustc_expand: use collect_bang helper instead of manual reimplementation
1 parent f7801d6 commit de2940f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_expand/src/expand.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1436,9 +1436,9 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
14361436
item.attrs = attrs;
14371437
self.check_attributes(&item.attrs);
14381438
item.and_then(|item| match item.kind {
1439-
ItemKind::MacCall(mac) => self
1440-
.collect(AstFragmentKind::Items, InvocationKind::Bang { mac, span })
1441-
.make_items(),
1439+
ItemKind::MacCall(mac) => {
1440+
self.collect_bang(mac, span, AstFragmentKind::Items).make_items()
1441+
}
14421442
_ => unreachable!(),
14431443
})
14441444
}

0 commit comments

Comments
 (0)