@@ -380,6 +380,20 @@ macro_rules! make_ast_visitor {
380
380
return_result!( V )
381
381
}
382
382
383
+ pub fn walk_closure_binder<$( $lt, ) ? V : $trait$( <$lt>) ?>(
384
+ vis: & mut V ,
385
+ binder: ref_t!( ClosureBinder )
386
+ ) -> result!( V ) {
387
+ match binder {
388
+ ClosureBinder :: NotPresent => { }
389
+ ClosureBinder :: For { generic_params, span } => {
390
+ visit_list!( vis, visit_generic_param, flat_map_generic_param, generic_params) ;
391
+ try_v!( visit_span!( vis, span) ) ;
392
+ }
393
+ }
394
+ return_result!( V )
395
+ }
396
+
383
397
pub fn walk_fn_ret_ty<$( $lt, ) ? V : $trait$( <$lt>) ?>(
384
398
vis: & mut V ,
385
399
ret_ty: ref_t!( FnRetTy )
@@ -1058,19 +1072,6 @@ pub mod visit {
1058
1072
V :: Result :: output ( )
1059
1073
}
1060
1074
1061
- pub fn walk_closure_binder < ' a , V : Visitor < ' a > > (
1062
- visitor : & mut V ,
1063
- binder : & ' a ClosureBinder ,
1064
- ) -> V :: Result {
1065
- match binder {
1066
- ClosureBinder :: NotPresent => { }
1067
- ClosureBinder :: For { generic_params, span : _ } => {
1068
- walk_list ! ( visitor, visit_generic_param, generic_params)
1069
- }
1070
- }
1071
- V :: Result :: output ( )
1072
- }
1073
-
1074
1075
pub fn walk_where_predicate < ' a , V : Visitor < ' a > > (
1075
1076
visitor : & mut V ,
1076
1077
predicate : & ' a WherePredicate ,
@@ -2055,15 +2056,6 @@ pub mod mut_visit {
2055
2056
}
2056
2057
}
2057
2058
2058
- fn walk_closure_binder < T : MutVisitor > ( vis : & mut T , binder : & mut ClosureBinder ) {
2059
- match binder {
2060
- ClosureBinder :: NotPresent => { }
2061
- ClosureBinder :: For { span : _, generic_params } => {
2062
- generic_params. flat_map_in_place ( |param| vis. flat_map_generic_param ( param) ) ;
2063
- }
2064
- }
2065
- }
2066
-
2067
2059
fn walk_coroutine_kind < T : MutVisitor > ( vis : & mut T , coroutine_kind : & mut CoroutineKind ) {
2068
2060
match coroutine_kind {
2069
2061
CoroutineKind :: Async { span, closure_id, return_impl_trait_id }
0 commit comments