Skip to content

Commit 09a40af

Browse files
authored
Rollup merge of #78794 - est31:collect_bang, r=oli-obk
rustc_expand: use collect_bang helper instead of manual reimplementation
2 parents 0a89d7b + de2940f commit 09a40af

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)