@@ -86,7 +86,7 @@ macro_rules! ast_fragments {
8686 }
8787 }
8888
89- fn make_from< ' a> ( self , result: Box <dyn MacResult + ' a >) -> Option <AstFragment > {
89+ fn make_from( self , result: Box <dyn MacResult + ' _ >) -> Option <AstFragment > {
9090 match self {
9191 AstFragmentKind :: OptExpr =>
9292 result. make_expr( ) . map( Some ) . map( AstFragment :: OptExpr ) ,
@@ -136,7 +136,7 @@ macro_rules! ast_fragments {
136136 T :: fragment_to_output( self )
137137 }
138138
139- pub ( crate ) fn mut_visit_with< F : MutVisitor > ( & mut self , vis: & mut F ) {
139+ pub ( crate ) fn mut_visit_with( & mut self , vis: & mut impl MutVisitor ) {
140140 match self {
141141 AstFragment :: OptExpr ( opt_expr) => {
142142 if let Some ( expr) = opt_expr. take( ) {
@@ -316,9 +316,9 @@ impl AstFragmentKind {
316316 }
317317 }
318318
319- pub ( crate ) fn expect_from_annotatables < I : IntoIterator < Item = Annotatable > > (
319+ pub ( crate ) fn expect_from_annotatables (
320320 self ,
321- items : I ,
321+ items : impl IntoIterator < Item = Annotatable > ,
322322 ) -> AstFragment {
323323 let mut items = items. into_iter ( ) ;
324324 match self {
@@ -1218,10 +1218,10 @@ trait InvocationCollectorNode: HasAttrs + HasNodeId + Sized {
12181218 fn descr ( ) -> & ' static str {
12191219 unreachable ! ( )
12201220 }
1221- fn walk_flat_map < V : MutVisitor > ( self , _visitor : & mut V ) -> Self :: OutputTy {
1221+ fn walk_flat_map ( self , _collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
12221222 unreachable ! ( )
12231223 }
1224- fn walk < V : MutVisitor > ( & mut self , _visitor : & mut V ) {
1224+ fn walk ( & mut self , _collector : & mut InvocationCollector < ' _ , ' _ > ) {
12251225 unreachable ! ( )
12261226 }
12271227 fn is_mac_call ( & self ) -> bool {
@@ -1276,8 +1276,8 @@ impl InvocationCollectorNode for P<ast::Item> {
12761276 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
12771277 fragment. make_items ( )
12781278 }
1279- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1280- walk_flat_map_item ( visitor , self )
1279+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1280+ walk_flat_map_item ( collector , self )
12811281 }
12821282 fn is_mac_call ( & self ) -> bool {
12831283 matches ! ( self . kind, ItemKind :: MacCall ( ..) )
@@ -1431,8 +1431,8 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, TraitItemTag>
14311431 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
14321432 fragment. make_trait_items ( )
14331433 }
1434- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1435- walk_flat_map_assoc_item ( visitor , self . wrapped , AssocCtxt :: Trait )
1434+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1435+ walk_flat_map_assoc_item ( collector , self . wrapped , AssocCtxt :: Trait )
14361436 }
14371437 fn is_mac_call ( & self ) -> bool {
14381438 matches ! ( self . wrapped. kind, AssocItemKind :: MacCall ( ..) )
@@ -1472,8 +1472,8 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, ImplItemTag>
14721472 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
14731473 fragment. make_impl_items ( )
14741474 }
1475- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1476- walk_flat_map_assoc_item ( visitor , self . wrapped , AssocCtxt :: Impl { of_trait : false } )
1475+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1476+ walk_flat_map_assoc_item ( collector , self . wrapped , AssocCtxt :: Impl { of_trait : false } )
14771477 }
14781478 fn is_mac_call ( & self ) -> bool {
14791479 matches ! ( self . wrapped. kind, AssocItemKind :: MacCall ( ..) )
@@ -1513,8 +1513,8 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::AssocItem>, TraitImplItem
15131513 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
15141514 fragment. make_trait_impl_items ( )
15151515 }
1516- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1517- walk_flat_map_assoc_item ( visitor , self . wrapped , AssocCtxt :: Impl { of_trait : true } )
1516+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1517+ walk_flat_map_assoc_item ( collector , self . wrapped , AssocCtxt :: Impl { of_trait : true } )
15181518 }
15191519 fn is_mac_call ( & self ) -> bool {
15201520 matches ! ( self . wrapped. kind, AssocItemKind :: MacCall ( ..) )
@@ -1551,8 +1551,8 @@ impl InvocationCollectorNode for P<ast::ForeignItem> {
15511551 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
15521552 fragment. make_foreign_items ( )
15531553 }
1554- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1555- walk_flat_map_foreign_item ( visitor , self )
1554+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1555+ walk_flat_map_foreign_item ( collector , self )
15561556 }
15571557 fn is_mac_call ( & self ) -> bool {
15581558 matches ! ( self . kind, ForeignItemKind :: MacCall ( ..) )
@@ -1573,8 +1573,8 @@ impl InvocationCollectorNode for ast::Variant {
15731573 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
15741574 fragment. make_variants ( )
15751575 }
1576- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1577- walk_flat_map_variant ( visitor , self )
1576+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1577+ walk_flat_map_variant ( collector , self )
15781578 }
15791579}
15801580
@@ -1586,8 +1586,8 @@ impl InvocationCollectorNode for ast::WherePredicate {
15861586 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
15871587 fragment. make_where_predicates ( )
15881588 }
1589- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1590- walk_flat_map_where_predicate ( visitor , self )
1589+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1590+ walk_flat_map_where_predicate ( collector , self )
15911591 }
15921592}
15931593
@@ -1599,8 +1599,8 @@ impl InvocationCollectorNode for ast::FieldDef {
15991599 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
16001600 fragment. make_field_defs ( )
16011601 }
1602- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1603- walk_flat_map_field_def ( visitor , self )
1602+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1603+ walk_flat_map_field_def ( collector , self )
16041604 }
16051605}
16061606
@@ -1612,8 +1612,8 @@ impl InvocationCollectorNode for ast::PatField {
16121612 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
16131613 fragment. make_pat_fields ( )
16141614 }
1615- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1616- walk_flat_map_pat_field ( visitor , self )
1615+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1616+ walk_flat_map_pat_field ( collector , self )
16171617 }
16181618}
16191619
@@ -1625,8 +1625,8 @@ impl InvocationCollectorNode for ast::ExprField {
16251625 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
16261626 fragment. make_expr_fields ( )
16271627 }
1628- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1629- walk_flat_map_expr_field ( visitor , self )
1628+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1629+ walk_flat_map_expr_field ( collector , self )
16301630 }
16311631}
16321632
@@ -1638,8 +1638,8 @@ impl InvocationCollectorNode for ast::Param {
16381638 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
16391639 fragment. make_params ( )
16401640 }
1641- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1642- walk_flat_map_param ( visitor , self )
1641+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1642+ walk_flat_map_param ( collector , self )
16431643 }
16441644}
16451645
@@ -1651,8 +1651,8 @@ impl InvocationCollectorNode for ast::GenericParam {
16511651 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
16521652 fragment. make_generic_params ( )
16531653 }
1654- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1655- walk_flat_map_generic_param ( visitor , self )
1654+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1655+ walk_flat_map_generic_param ( collector , self )
16561656 }
16571657}
16581658
@@ -1664,8 +1664,8 @@ impl InvocationCollectorNode for ast::Arm {
16641664 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
16651665 fragment. make_arms ( )
16661666 }
1667- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1668- walk_flat_map_arm ( visitor , self )
1667+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1668+ walk_flat_map_arm ( collector , self )
16691669 }
16701670}
16711671
@@ -1677,8 +1677,8 @@ impl InvocationCollectorNode for ast::Stmt {
16771677 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
16781678 fragment. make_stmts ( )
16791679 }
1680- fn walk_flat_map < V : MutVisitor > ( self , visitor : & mut V ) -> Self :: OutputTy {
1681- walk_flat_map_stmt ( visitor , self )
1680+ fn walk_flat_map ( self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1681+ walk_flat_map_stmt ( collector , self )
16821682 }
16831683 fn is_mac_call ( & self ) -> bool {
16841684 match & self . kind {
@@ -1751,8 +1751,8 @@ impl InvocationCollectorNode for ast::Crate {
17511751 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
17521752 fragment. make_crate ( )
17531753 }
1754- fn walk < V : MutVisitor > ( & mut self , visitor : & mut V ) {
1755- walk_crate ( visitor , self )
1754+ fn walk ( & mut self , collector : & mut InvocationCollector < ' _ , ' _ > ) {
1755+ walk_crate ( collector , self )
17561756 }
17571757 fn expand_cfg_false (
17581758 & mut self ,
@@ -1777,8 +1777,8 @@ impl InvocationCollectorNode for ast::Ty {
17771777 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
17781778 fragment. make_ty ( )
17791779 }
1780- fn walk < V : MutVisitor > ( & mut self , visitor : & mut V ) {
1781- walk_ty ( visitor , self )
1780+ fn walk ( & mut self , collector : & mut InvocationCollector < ' _ , ' _ > ) {
1781+ walk_ty ( collector , self )
17821782 }
17831783 fn is_mac_call ( & self ) -> bool {
17841784 matches ! ( self . kind, ast:: TyKind :: MacCall ( ..) )
@@ -1800,8 +1800,8 @@ impl InvocationCollectorNode for ast::Pat {
18001800 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
18011801 fragment. make_pat ( )
18021802 }
1803- fn walk < V : MutVisitor > ( & mut self , visitor : & mut V ) {
1804- walk_pat ( visitor , self )
1803+ fn walk ( & mut self , collector : & mut InvocationCollector < ' _ , ' _ > ) {
1804+ walk_pat ( collector , self )
18051805 }
18061806 fn is_mac_call ( & self ) -> bool {
18071807 matches ! ( self . kind, PatKind :: MacCall ( ..) )
@@ -1826,8 +1826,8 @@ impl InvocationCollectorNode for ast::Expr {
18261826 fn descr ( ) -> & ' static str {
18271827 "an expression"
18281828 }
1829- fn walk < V : MutVisitor > ( & mut self , visitor : & mut V ) {
1830- walk_expr ( visitor , self )
1829+ fn walk ( & mut self , collector : & mut InvocationCollector < ' _ , ' _ > ) {
1830+ walk_expr ( collector , self )
18311831 }
18321832 fn is_mac_call ( & self ) -> bool {
18331833 matches ! ( self . kind, ExprKind :: MacCall ( ..) )
@@ -1850,8 +1850,8 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::Expr>, OptExprTag> {
18501850 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
18511851 fragment. make_opt_expr ( )
18521852 }
1853- fn walk_flat_map < V : MutVisitor > ( mut self , visitor : & mut V ) -> Self :: OutputTy {
1854- walk_expr ( visitor , & mut self . wrapped ) ;
1853+ fn walk_flat_map ( mut self , collector : & mut InvocationCollector < ' _ , ' _ > ) -> Self :: OutputTy {
1854+ walk_expr ( collector , & mut self . wrapped ) ;
18551855 Some ( self . wrapped )
18561856 }
18571857 fn is_mac_call ( & self ) -> bool {
@@ -1885,8 +1885,8 @@ impl InvocationCollectorNode for AstNodeWrapper<P<ast::Expr>, MethodReceiverTag>
18851885 fn fragment_to_output ( fragment : AstFragment ) -> Self :: OutputTy {
18861886 AstNodeWrapper :: new ( fragment. make_method_receiver_expr ( ) , MethodReceiverTag )
18871887 }
1888- fn walk < V : MutVisitor > ( & mut self , visitor : & mut V ) {
1889- walk_expr ( visitor , & mut self . wrapped )
1888+ fn walk ( & mut self , collector : & mut InvocationCollector < ' _ , ' _ > ) {
1889+ walk_expr ( collector , & mut self . wrapped )
18901890 }
18911891 fn is_mac_call ( & self ) -> bool {
18921892 matches ! ( self . wrapped. kind, ast:: ExprKind :: MacCall ( ..) )
0 commit comments