@@ -1640,15 +1640,15 @@ impl InvocationCollectorNode for P<ast::Pat> {
1640
1640
}
1641
1641
}
1642
1642
1643
- impl InvocationCollectorNode for P < ast:: Expr > {
1644
- type OutputTy = P < ast:: Expr > ;
1643
+ impl InvocationCollectorNode for ast:: Expr {
1644
+ type OutputTy = ast:: Expr ;
1645
1645
type AttrsTy = ast:: AttrVec ;
1646
1646
const KIND : AstFragmentKind = AstFragmentKind :: Expr ;
1647
1647
fn to_annotatable ( self ) -> Annotatable {
1648
- Annotatable :: Expr ( self )
1648
+ Annotatable :: Expr ( P ( self ) )
1649
1649
}
1650
1650
fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
1651
- fragment. make_expr ( )
1651
+ fragment. make_expr ( ) . into_inner ( )
1652
1652
}
1653
1653
fn descr ( ) -> & ' static str {
1654
1654
"an expression"
@@ -1660,9 +1660,8 @@ impl InvocationCollectorNode for P<ast::Expr> {
1660
1660
matches ! ( self . kind, ExprKind :: MacCall ( ..) )
1661
1661
}
1662
1662
fn take_mac_call ( self ) -> ( P < ast:: MacCall > , Self :: AttrsTy , AddSemicolon ) {
1663
- let node = self . into_inner ( ) ;
1664
- match node. kind {
1665
- ExprKind :: MacCall ( mac) => ( mac, node. attrs , AddSemicolon :: No ) ,
1663
+ match self . kind {
1664
+ ExprKind :: MacCall ( mac) => ( mac, self . attrs , AddSemicolon :: No ) ,
1666
1665
_ => unreachable ! ( ) ,
1667
1666
}
1668
1667
}
@@ -2184,7 +2183,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
2184
2183
self . visit_node ( node)
2185
2184
}
2186
2185
2187
- fn visit_expr ( & mut self , node : & mut P < ast:: Expr > ) {
2186
+ fn visit_expr ( & mut self , node : & mut ast:: Expr ) {
2188
2187
// FIXME: Feature gating is performed inconsistently between `Expr` and `OptExpr`.
2189
2188
if let Some ( attr) = node. attrs . first ( ) {
2190
2189
self . cfg ( ) . maybe_emit_expr_attr_err ( attr) ;
0 commit comments