From de2940ff6301f23fd721e0d6f38b23ae2e3a9746 Mon Sep 17 00:00:00 2001 From: est31 Date: Fri, 6 Nov 2020 02:46:03 +0100 Subject: [PATCH] rustc_expand: use collect_bang helper instead of manual reimplementation --- compiler/rustc_expand/src/expand.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index 3e5762ab992f4..f6959591b5660 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -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!(), }) }