Skip to content

Commit fc1aa2e

Browse files
authored
Rollup merge of rust-lang#78794 - est31:collect_bang, r=oli-obk
rustc_expand: use collect_bang helper instead of manual reimplementation
2 parents 821f92b + de2940f commit fc1aa2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_expand/src/expand.rs

Lines changed: 3 additions & 3 deletions
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)