@@ -348,6 +348,7 @@ macro_rules! make_ast_visitor {
348348 make_visit!{ PreciseCapturingArg ; visit_precise_capturing_arg, walk_precise_capturing_arg}
349349 make_visit!{ Safety ; visit_safety, walk_safety}
350350 make_visit!{ TraitRef ; visit_trait_ref, walk_trait_ref}
351+ make_visit!{ TyAliasWhereClauses ; visit_ty_alias_where_clauses, walk_ty_alias_where_clauses}
351352 make_visit!{ UseTree , id: NodeId , _ nested: bool ; visit_use_tree, walk_use_tree}
352353 make_visit!{ Variant ; visit_variant, walk_variant}
353354 make_visit!{ VariantData ; visit_variant_data, walk_variant_data}
@@ -957,6 +958,18 @@ macro_rules! make_ast_visitor {
957958 return_result!( V )
958959 }
959960
961+ pub fn walk_ty_alias_where_clauses<$( $lt, ) ? V : $trait$( <$lt>) ?>(
962+ vis: & mut V ,
963+ tawcs: ref_t!( TyAliasWhereClauses )
964+ ) -> result!( V ) {
965+ let TyAliasWhereClauses { before, after, split: _ } = tawcs;
966+ let TyAliasWhereClause { has_where_token: _, span: span_before } = before;
967+ let TyAliasWhereClause { has_where_token: _, span: span_after } = after;
968+ try_v!( visit_span!( vis, span_before) ) ;
969+ try_v!( visit_span!( vis, span_after) ) ;
970+ return_result!( V )
971+ }
972+
960973 pub fn walk_use_tree<$( $lt, ) ? V : $trait$( <$lt>) ?>(
961974 vis: & mut V ,
962975 use_tree: ref_t!( UseTree ) ,
@@ -1358,11 +1371,12 @@ pub mod visit {
13581371 bounds,
13591372 ty,
13601373 defaultness : _,
1361- where_clauses : _ ,
1374+ where_clauses,
13621375 } ) => {
13631376 try_visit ! ( visitor. visit_generics( generics) ) ;
13641377 walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
13651378 visit_opt ! ( visitor, visit_ty, ty) ;
1379+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
13661380 }
13671381 ItemKind :: Enum ( enum_definition, generics) => {
13681382 try_visit ! ( visitor. visit_generics( generics) ) ;
@@ -1462,11 +1476,12 @@ pub mod visit {
14621476 bounds,
14631477 ty,
14641478 defaultness : _,
1465- where_clauses : _ ,
1479+ where_clauses,
14661480 } ) => {
14671481 try_visit ! ( visitor. visit_generics( generics) ) ;
14681482 walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
14691483 visit_opt ! ( visitor, visit_ty, ty) ;
1484+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
14701485 }
14711486 ForeignItemKind :: MacCall ( mac) => {
14721487 try_visit ! ( visitor. visit_mac_call( mac) ) ;
@@ -1518,11 +1533,12 @@ pub mod visit {
15181533 bounds,
15191534 ty,
15201535 defaultness : _,
1521- where_clauses : _ ,
1536+ where_clauses,
15221537 } ) => {
15231538 try_visit ! ( visitor. visit_generics( generics) ) ;
15241539 walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
15251540 visit_opt ! ( visitor, visit_ty, ty) ;
1541+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
15261542 }
15271543 AssocItemKind :: MacCall ( mac) => {
15281544 try_visit ! ( visitor. visit_mac_call( mac) ) ;
@@ -2119,14 +2135,6 @@ pub mod mut_visit {
21192135 smallvec ! [ param]
21202136 }
21212137
2122- fn walk_ty_alias_where_clauses < T : MutVisitor > ( vis : & mut T , tawcs : & mut TyAliasWhereClauses ) {
2123- let TyAliasWhereClauses { before, after, split : _ } = tawcs;
2124- let TyAliasWhereClause { has_where_token : _, span : span_before } = before;
2125- let TyAliasWhereClause { has_where_token : _, span : span_after } = after;
2126- vis. visit_span ( span_before) ;
2127- vis. visit_span ( span_after) ;
2128- }
2129-
21302138 pub fn walk_flat_map_field_def < T : MutVisitor > (
21312139 visitor : & mut T ,
21322140 mut fd : FieldDef ,
@@ -2196,7 +2204,7 @@ pub mod mut_visit {
21962204 vis. visit_generics ( generics) ;
21972205 visit_bounds ( vis, bounds, BoundKind :: Bound ) ;
21982206 visit_opt ( ty, |ty| vis. visit_ty ( ty) ) ;
2199- walk_ty_alias_where_clauses ( vis, where_clauses) ;
2207+ vis. visit_ty_alias_where_clauses ( where_clauses) ;
22002208 }
22012209 ItemKind :: Enum ( enum_def, generics) => {
22022210 vis. visit_generics ( generics) ;
@@ -2296,7 +2304,7 @@ pub mod mut_visit {
22962304 visitor. visit_generics ( generics) ;
22972305 visit_bounds ( visitor, bounds, BoundKind :: Bound ) ;
22982306 visit_opt ( ty, |ty| visitor. visit_ty ( ty) ) ;
2299- walk_ty_alias_where_clauses ( visitor, where_clauses) ;
2307+ visitor. visit_ty_alias_where_clauses ( where_clauses) ;
23002308 }
23012309 AssocItemKind :: MacCall ( mac) => visitor. visit_mac_call ( mac) ,
23022310 AssocItemKind :: Delegation ( box Delegation {
@@ -2396,7 +2404,7 @@ pub mod mut_visit {
23962404 visitor. visit_generics ( generics) ;
23972405 visit_bounds ( visitor, bounds, BoundKind :: Bound ) ;
23982406 visit_opt ( ty, |ty| visitor. visit_ty ( ty) ) ;
2399- walk_ty_alias_where_clauses ( visitor, where_clauses) ;
2407+ visitor. visit_ty_alias_where_clauses ( where_clauses) ;
24002408 }
24012409 ForeignItemKind :: MacCall ( mac) => visitor. visit_mac_call ( mac) ,
24022410 }
0 commit comments