@@ -1634,15 +1634,15 @@ impl InvocationCollectorNode for P<ast::Pat> {
1634
1634
}
1635
1635
}
1636
1636
1637
- impl InvocationCollectorNode for P < ast:: Expr > {
1638
- type OutputTy = P < ast:: Expr > ;
1637
+ impl InvocationCollectorNode for ast:: Expr {
1638
+ type OutputTy = ast:: Expr ;
1639
1639
type AttrsTy = ast:: AttrVec ;
1640
1640
const KIND : AstFragmentKind = AstFragmentKind :: Expr ;
1641
1641
fn to_annotatable ( self ) -> Annotatable {
1642
- Annotatable :: Expr ( self )
1642
+ Annotatable :: Expr ( P ( self ) )
1643
1643
}
1644
1644
fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
1645
- fragment. make_expr ( )
1645
+ fragment. make_expr ( ) . into_inner ( )
1646
1646
}
1647
1647
fn descr ( ) -> & ' static str {
1648
1648
"an expression"
@@ -1654,9 +1654,8 @@ impl InvocationCollectorNode for P<ast::Expr> {
1654
1654
matches ! ( self . kind, ExprKind :: MacCall ( ..) )
1655
1655
}
1656
1656
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 ) ,
1660
1659
_ => unreachable ! ( ) ,
1661
1660
}
1662
1661
}
@@ -2178,7 +2177,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
2178
2177
self . visit_node ( node)
2179
2178
}
2180
2179
2181
- fn visit_expr ( & mut self , node : & mut P < ast:: Expr > ) {
2180
+ fn visit_expr ( & mut self , node : & mut ast:: Expr ) {
2182
2181
// FIXME: Feature gating is performed inconsistently between `Expr` and `OptExpr`.
2183
2182
if let Some ( attr) = node. attrs . first ( ) {
2184
2183
self . cfg ( ) . maybe_emit_expr_attr_err ( attr) ;
0 commit comments