@@ -1188,9 +1188,8 @@ impl InvocationCollectorNode for P<ast::Item> {
11881188 matches ! ( self . kind, ItemKind :: MacCall ( ..) )
11891189 }
11901190 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1191- let node = self . into_inner ( ) ;
1192- match node. kind {
1193- ItemKind :: MacCall ( mac) => ( mac, node. attrs , AddSemicolon :: No ) ,
1191+ match self . kind {
1192+ ItemKind :: MacCall ( mac) => ( mac, self . attrs , AddSemicolon :: No ) ,
11941193 _ => unreachable ! ( ) ,
11951194 }
11961195 }
@@ -1344,7 +1343,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, TraitItemTag>
13441343 matches ! ( self . wrapped. kind, AssocItemKind :: MacCall ( ..) )
13451344 }
13461345 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1347- let item = self . wrapped . into_inner ( ) ;
1346+ let item = self . wrapped ;
13481347 match item. kind {
13491348 AssocItemKind :: MacCall ( mac) => ( mac, item. attrs , AddSemicolon :: No ) ,
13501349 _ => unreachable ! ( ) ,
@@ -1385,7 +1384,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, ImplItemTag>
13851384 matches ! ( self . wrapped. kind, AssocItemKind :: MacCall ( ..) )
13861385 }
13871386 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1388- let item = self . wrapped . into_inner ( ) ;
1387+ let item = self . wrapped ;
13891388 match item. kind {
13901389 AssocItemKind :: MacCall ( mac) => ( mac, item. attrs , AddSemicolon :: No ) ,
13911390 _ => unreachable ! ( ) ,
@@ -1426,7 +1425,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, TraitImplItem
14261425 matches ! ( self . wrapped. kind, AssocItemKind :: MacCall ( ..) )
14271426 }
14281427 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1429- let item = self . wrapped . into_inner ( ) ;
1428+ let item = self . wrapped ;
14301429 match item. kind {
14311430 AssocItemKind :: MacCall ( mac) => ( mac, item. attrs , AddSemicolon :: No ) ,
14321431 _ => unreachable ! ( ) ,
@@ -1464,9 +1463,8 @@ impl InvocationCollectorNode for P<ast::ForeignItem> {
14641463 matches ! ( self . kind, ForeignItemKind :: MacCall ( ..) )
14651464 }
14661465 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1467- let node = self . into_inner ( ) ;
1468- match node. kind {
1469- ForeignItemKind :: MacCall ( mac) => ( mac, node. attrs , AddSemicolon :: No ) ,
1466+ match self . kind {
1467+ ForeignItemKind :: MacCall ( mac) => ( mac, self . attrs , AddSemicolon :: No ) ,
14701468 _ => unreachable ! ( ) ,
14711469 }
14721470 }
@@ -1601,16 +1599,16 @@ impl InvocationCollectorNode for ast::Stmt {
16011599 // `StmtKind`s and treat them as statement macro invocations, not as items or expressions.
16021600 let ( add_semicolon, mac, attrs) = match self . kind {
16031601 StmtKind :: MacCall ( mac) => {
1604- let ast:: MacCallStmt { mac, style, attrs, .. } = mac. into_inner ( ) ;
1602+ let ast:: MacCallStmt { mac, style, attrs, .. } = * mac;
16051603 ( style == MacStmtStyle :: Semicolon , mac, attrs)
16061604 }
1607- StmtKind :: Item ( item) => match item. into_inner ( ) {
1605+ StmtKind :: Item ( item) => match * item {
16081606 ast:: Item { kind : ItemKind :: MacCall ( mac) , attrs, .. } => {
16091607 ( mac. args . need_semicolon ( ) , mac, attrs)
16101608 }
16111609 _ => unreachable ! ( ) ,
16121610 } ,
1613- StmtKind :: Semi ( expr) => match expr. into_inner ( ) {
1611+ StmtKind :: Semi ( expr) => match * expr {
16141612 ast:: Expr { kind : ExprKind :: MacCall ( mac) , attrs, .. } => {
16151613 ( mac. args . need_semicolon ( ) , mac, attrs)
16161614 }
@@ -1691,8 +1689,7 @@ impl InvocationCollectorNode for P<ast::Ty> {
16911689 matches ! ( self . kind, ast:: TyKind :: MacCall ( ..) )
16921690 }
16931691 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1694- let node = self . into_inner ( ) ;
1695- match node. kind {
1692+ match self . kind {
16961693 TyKind :: MacCall ( mac) => ( mac, AttrVec :: new ( ) , AddSemicolon :: No ) ,
16971694 _ => unreachable ! ( ) ,
16981695 }
@@ -1715,8 +1712,7 @@ impl InvocationCollectorNode for P<ast::Pat> {
17151712 matches ! ( self . kind, PatKind :: MacCall ( ..) )
17161713 }
17171714 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1718- let node = self . into_inner ( ) ;
1719- match node. kind {
1715+ match self . kind {
17201716 PatKind :: MacCall ( mac) => ( mac, AttrVec :: new ( ) , AddSemicolon :: No ) ,
17211717 _ => unreachable ! ( ) ,
17221718 }
@@ -1742,9 +1738,8 @@ impl InvocationCollectorNode for P<ast::Expr> {
17421738 matches ! ( self . kind, ExprKind :: MacCall ( ..) )
17431739 }
17441740 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1745- let node = self . into_inner ( ) ;
1746- match node. kind {
1747- ExprKind :: MacCall ( mac) => ( mac, node. attrs , AddSemicolon :: No ) ,
1741+ match self . kind {
1742+ ExprKind :: MacCall ( mac) => ( mac, self . attrs , AddSemicolon :: No ) ,
17481743 _ => unreachable ! ( ) ,
17491744 }
17501745 }
@@ -1768,7 +1763,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::Expr>, OptExprTag> {
17681763 matches ! ( self . wrapped. kind, ast:: ExprKind :: MacCall ( ..) )
17691764 }
17701765 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1771- let node = self . wrapped . into_inner ( ) ;
1766+ let node = self . wrapped ;
17721767 match node. kind {
17731768 ExprKind :: MacCall ( mac) => ( mac, node. attrs , AddSemicolon :: No ) ,
17741769 _ => unreachable ! ( ) ,
@@ -1806,7 +1801,7 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::Expr>, MethodReceiverTag>
18061801 matches ! ( self . wrapped. kind, ast:: ExprKind :: MacCall ( ..) )
18071802 }
18081803 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , ast:: AttrVec , AddSemicolon ) {
1809- let node = self . wrapped . into_inner ( ) ;
1804+ let node = self . wrapped ;
18101805 match node. kind {
18111806 ExprKind :: MacCall ( mac) => ( mac, node. attrs , AddSemicolon :: No ) ,
18121807 _ => unreachable ! ( ) ,
0 commit comments