@@ -1634,15 +1634,15 @@ impl InvocationCollectorNode for P<ast::Pat> {
16341634 }
16351635}
16361636
1637- impl InvocationCollectorNode for P < ast:: Expr > {
1638- type OutputTy = P < ast:: Expr > ;
1637+ impl InvocationCollectorNode for ast:: Expr {
1638+ type OutputTy = ast:: Expr ;
16391639 type AttrsTy = ast:: AttrVec ;
16401640 const KIND : AstFragmentKind = AstFragmentKind :: Expr ;
16411641 fn to_annotatable ( self ) -> Annotatable {
1642- Annotatable :: Expr ( self )
1642+ Annotatable :: Expr ( P ( self ) )
16431643 }
16441644 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
1645- fragment. make_expr ( )
1645+ fragment. make_expr ( ) . into_inner ( )
16461646 }
16471647 fn descr ( ) -> & ' static str {
16481648 "an expression"
@@ -1654,9 +1654,8 @@ impl InvocationCollectorNode for P<ast::Expr> {
16541654 matches ! ( self . kind, ExprKind :: MacCall ( ..) )
16551655 }
16561656 fn take_mac_call ( self ) -> ( P < ast:: MacCall > , Self :: AttrsTy , AddSemicolon ) {
1657- let node = self . into_inner ( ) ;
1658- match node. kind {
1659- ExprKind :: MacCall ( mac) => ( mac, node. attrs , AddSemicolon :: No ) ,
1657+ match self . kind {
1658+ ExprKind :: MacCall ( mac) => ( mac, self . attrs , AddSemicolon :: No ) ,
16601659 _ => unreachable ! ( ) ,
16611660 }
16621661 }
@@ -2178,7 +2177,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
21782177 self . visit_node ( node)
21792178 }
21802179
2181- fn visit_expr ( & mut self , node : & mut P < ast:: Expr > ) {
2180+ fn visit_expr ( & mut self , node : & mut ast:: Expr ) {
21822181 // FIXME: Feature gating is performed inconsistently between `Expr` and `OptExpr`.
21832182 if let Some ( attr) = node. attrs . first ( ) {
21842183 self . cfg ( ) . maybe_emit_expr_attr_err ( attr) ;
0 commit comments