@@ -342,6 +342,7 @@ macro_rules! make_ast_visitor {
342
342
make_visit!{ PreciseCapturingArg ; visit_precise_capturing_arg, walk_precise_capturing_arg}
343
343
make_visit!{ Safety ; visit_safety, walk_safety}
344
344
make_visit!{ TraitRef ; visit_trait_ref, walk_trait_ref}
345
+ make_visit!{ TyAliasWhereClauses ; visit_ty_alias_where_clauses, walk_ty_alias_where_clauses}
345
346
make_visit!{ UseTree , id: NodeId , _ nested: bool ; visit_use_tree, walk_use_tree}
346
347
make_visit!{ Variant ; visit_variant, walk_variant}
347
348
make_visit!{ VariantData ; visit_variant_data, walk_variant_data}
@@ -951,6 +952,18 @@ macro_rules! make_ast_visitor {
951
952
return_result!( V )
952
953
}
953
954
955
+ pub fn walk_ty_alias_where_clauses<$( $lt, ) ? V : $trait$( <$lt>) ?>(
956
+ vis: & mut V ,
957
+ tawcs: ref_t!( TyAliasWhereClauses )
958
+ ) -> result!( V ) {
959
+ let TyAliasWhereClauses { before, after, split: _ } = tawcs;
960
+ let TyAliasWhereClause { has_where_token: _, span: span_before } = before;
961
+ let TyAliasWhereClause { has_where_token: _, span: span_after } = after;
962
+ try_v!( visit_span!( vis, span_before) ) ;
963
+ try_v!( visit_span!( vis, span_after) ) ;
964
+ return_result!( V )
965
+ }
966
+
954
967
pub fn walk_use_tree<$( $lt, ) ? V : $trait$( <$lt>) ?>(
955
968
vis: & mut V ,
956
969
use_tree: ref_t!( UseTree ) ,
@@ -1352,11 +1365,12 @@ pub mod visit {
1352
1365
bounds,
1353
1366
ty,
1354
1367
defaultness : _,
1355
- where_clauses : _ ,
1368
+ where_clauses,
1356
1369
} ) => {
1357
1370
try_visit ! ( visitor. visit_generics( generics) ) ;
1358
1371
walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
1359
1372
visit_opt ! ( visitor, visit_ty, ty) ;
1373
+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
1360
1374
}
1361
1375
ItemKind :: Enum ( enum_definition, generics) => {
1362
1376
try_visit ! ( visitor. visit_generics( generics) ) ;
@@ -1456,11 +1470,12 @@ pub mod visit {
1456
1470
bounds,
1457
1471
ty,
1458
1472
defaultness : _,
1459
- where_clauses : _ ,
1473
+ where_clauses,
1460
1474
} ) => {
1461
1475
try_visit ! ( visitor. visit_generics( generics) ) ;
1462
1476
walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
1463
1477
visit_opt ! ( visitor, visit_ty, ty) ;
1478
+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
1464
1479
}
1465
1480
ForeignItemKind :: MacCall ( mac) => {
1466
1481
try_visit ! ( visitor. visit_mac_call( mac) ) ;
@@ -1512,11 +1527,12 @@ pub mod visit {
1512
1527
bounds,
1513
1528
ty,
1514
1529
defaultness : _,
1515
- where_clauses : _ ,
1530
+ where_clauses,
1516
1531
} ) => {
1517
1532
try_visit ! ( visitor. visit_generics( generics) ) ;
1518
1533
walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
1519
1534
visit_opt ! ( visitor, visit_ty, ty) ;
1535
+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
1520
1536
}
1521
1537
AssocItemKind :: MacCall ( mac) => {
1522
1538
try_visit ! ( visitor. visit_mac_call( mac) ) ;
@@ -2113,14 +2129,6 @@ pub mod mut_visit {
2113
2129
smallvec ! [ param]
2114
2130
}
2115
2131
2116
- fn walk_ty_alias_where_clauses < T : MutVisitor > ( vis : & mut T , tawcs : & mut TyAliasWhereClauses ) {
2117
- let TyAliasWhereClauses { before, after, split : _ } = tawcs;
2118
- let TyAliasWhereClause { has_where_token : _, span : span_before } = before;
2119
- let TyAliasWhereClause { has_where_token : _, span : span_after } = after;
2120
- vis. visit_span ( span_before) ;
2121
- vis. visit_span ( span_after) ;
2122
- }
2123
-
2124
2132
pub fn walk_flat_map_field_def < T : MutVisitor > (
2125
2133
visitor : & mut T ,
2126
2134
mut fd : FieldDef ,
@@ -2190,7 +2198,7 @@ pub mod mut_visit {
2190
2198
vis. visit_generics ( generics) ;
2191
2199
visit_bounds ( vis, bounds, BoundKind :: Bound ) ;
2192
2200
visit_opt ( ty, |ty| vis. visit_ty ( ty) ) ;
2193
- walk_ty_alias_where_clauses ( vis, where_clauses) ;
2201
+ vis. visit_ty_alias_where_clauses ( where_clauses) ;
2194
2202
}
2195
2203
ItemKind :: Enum ( enum_def, generics) => {
2196
2204
vis. visit_generics ( generics) ;
@@ -2290,7 +2298,7 @@ pub mod mut_visit {
2290
2298
visitor. visit_generics ( generics) ;
2291
2299
visit_bounds ( visitor, bounds, BoundKind :: Bound ) ;
2292
2300
visit_opt ( ty, |ty| visitor. visit_ty ( ty) ) ;
2293
- walk_ty_alias_where_clauses ( visitor, where_clauses) ;
2301
+ visitor. visit_ty_alias_where_clauses ( where_clauses) ;
2294
2302
}
2295
2303
AssocItemKind :: MacCall ( mac) => visitor. visit_mac_call ( mac) ,
2296
2304
AssocItemKind :: Delegation ( box Delegation {
@@ -2390,7 +2398,7 @@ pub mod mut_visit {
2390
2398
visitor. visit_generics ( generics) ;
2391
2399
visit_bounds ( visitor, bounds, BoundKind :: Bound ) ;
2392
2400
visit_opt ( ty, |ty| visitor. visit_ty ( ty) ) ;
2393
- walk_ty_alias_where_clauses ( visitor, where_clauses) ;
2401
+ visitor. visit_ty_alias_where_clauses ( where_clauses) ;
2394
2402
}
2395
2403
ForeignItemKind :: MacCall ( mac) => visitor. visit_mac_call ( mac) ,
2396
2404
}
0 commit comments