@@ -348,6 +348,7 @@ macro_rules! make_ast_visitor {
348
348
make_visit!{ PreciseCapturingArg ; visit_precise_capturing_arg, walk_precise_capturing_arg}
349
349
make_visit!{ Safety ; visit_safety, walk_safety}
350
350
make_visit!{ TraitRef ; visit_trait_ref, walk_trait_ref}
351
+ make_visit!{ TyAliasWhereClauses ; visit_ty_alias_where_clauses, walk_ty_alias_where_clauses}
351
352
make_visit!{ UseTree , id: NodeId , _ nested: bool ; visit_use_tree, walk_use_tree}
352
353
make_visit!{ Variant ; visit_variant, walk_variant}
353
354
make_visit!{ VariantData ; visit_variant_data, walk_variant_data}
@@ -957,6 +958,18 @@ macro_rules! make_ast_visitor {
957
958
return_result!( V )
958
959
}
959
960
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
+
960
973
pub fn walk_use_tree<$( $lt, ) ? V : $trait$( <$lt>) ?>(
961
974
vis: & mut V ,
962
975
use_tree: ref_t!( UseTree ) ,
@@ -1358,11 +1371,12 @@ pub mod visit {
1358
1371
bounds,
1359
1372
ty,
1360
1373
defaultness : _,
1361
- where_clauses : _ ,
1374
+ where_clauses,
1362
1375
} ) => {
1363
1376
try_visit ! ( visitor. visit_generics( generics) ) ;
1364
1377
walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
1365
1378
visit_opt ! ( visitor, visit_ty, ty) ;
1379
+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
1366
1380
}
1367
1381
ItemKind :: Enum ( enum_definition, generics) => {
1368
1382
try_visit ! ( visitor. visit_generics( generics) ) ;
@@ -1462,11 +1476,12 @@ pub mod visit {
1462
1476
bounds,
1463
1477
ty,
1464
1478
defaultness : _,
1465
- where_clauses : _ ,
1479
+ where_clauses,
1466
1480
} ) => {
1467
1481
try_visit ! ( visitor. visit_generics( generics) ) ;
1468
1482
walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
1469
1483
visit_opt ! ( visitor, visit_ty, ty) ;
1484
+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
1470
1485
}
1471
1486
ForeignItemKind :: MacCall ( mac) => {
1472
1487
try_visit ! ( visitor. visit_mac_call( mac) ) ;
@@ -1518,11 +1533,12 @@ pub mod visit {
1518
1533
bounds,
1519
1534
ty,
1520
1535
defaultness : _,
1521
- where_clauses : _ ,
1536
+ where_clauses,
1522
1537
} ) => {
1523
1538
try_visit ! ( visitor. visit_generics( generics) ) ;
1524
1539
walk_list ! ( visitor, visit_param_bound, bounds, BoundKind :: Bound ) ;
1525
1540
visit_opt ! ( visitor, visit_ty, ty) ;
1541
+ try_visit ! ( visitor. visit_ty_alias_where_clauses( where_clauses) ) ;
1526
1542
}
1527
1543
AssocItemKind :: MacCall ( mac) => {
1528
1544
try_visit ! ( visitor. visit_mac_call( mac) ) ;
@@ -2119,14 +2135,6 @@ pub mod mut_visit {
2119
2135
smallvec ! [ param]
2120
2136
}
2121
2137
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
-
2130
2138
pub fn walk_flat_map_field_def < T : MutVisitor > (
2131
2139
visitor : & mut T ,
2132
2140
mut fd : FieldDef ,
@@ -2196,7 +2204,7 @@ pub mod mut_visit {
2196
2204
vis. visit_generics ( generics) ;
2197
2205
visit_bounds ( vis, bounds, BoundKind :: Bound ) ;
2198
2206
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) ;
2200
2208
}
2201
2209
ItemKind :: Enum ( enum_def, generics) => {
2202
2210
vis. visit_generics ( generics) ;
@@ -2296,7 +2304,7 @@ pub mod mut_visit {
2296
2304
visitor. visit_generics ( generics) ;
2297
2305
visit_bounds ( visitor, bounds, BoundKind :: Bound ) ;
2298
2306
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) ;
2300
2308
}
2301
2309
AssocItemKind :: MacCall ( mac) => visitor. visit_mac_call ( mac) ,
2302
2310
AssocItemKind :: Delegation ( box Delegation {
@@ -2396,7 +2404,7 @@ pub mod mut_visit {
2396
2404
visitor. visit_generics ( generics) ;
2397
2405
visit_bounds ( visitor, bounds, BoundKind :: Bound ) ;
2398
2406
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) ;
2400
2408
}
2401
2409
ForeignItemKind :: MacCall ( mac) => visitor. visit_mac_call ( mac) ,
2402
2410
}
0 commit comments