@@ -287,6 +287,10 @@ pub trait MutVisitor: Sized {
287
287
walk_variant_data ( self , vdata) ;
288
288
}
289
289
290
+ fn visit_generic_param ( & mut self , param : & mut GenericParam ) {
291
+ walk_generic_param ( self , param)
292
+ }
293
+
290
294
fn flat_map_generic_param ( & mut self , param : GenericParam ) -> SmallVec < [ GenericParam ; 1 ] > {
291
295
walk_flat_map_generic_param ( self , param)
292
296
}
@@ -978,11 +982,8 @@ fn walk_precise_capturing_arg<T: MutVisitor>(vis: &mut T, arg: &mut PreciseCaptu
978
982
}
979
983
}
980
984
981
- pub fn walk_flat_map_generic_param < T : MutVisitor > (
982
- vis : & mut T ,
983
- mut param : GenericParam ,
984
- ) -> SmallVec < [ GenericParam ; 1 ] > {
985
- let GenericParam { id, ident, attrs, bounds, kind, colon_span, is_placeholder : _ } = & mut param;
985
+ pub fn walk_generic_param < T : MutVisitor > ( vis : & mut T , param : & mut GenericParam ) {
986
+ let GenericParam { id, ident, attrs, bounds, kind, colon_span, is_placeholder : _ } = param;
986
987
vis. visit_id ( id) ;
987
988
visit_attrs ( vis, attrs) ;
988
989
vis. visit_ident ( ident) ;
@@ -1000,6 +1001,13 @@ pub fn walk_flat_map_generic_param<T: MutVisitor>(
1000
1001
if let Some ( colon_span) = colon_span {
1001
1002
vis. visit_span ( colon_span) ;
1002
1003
}
1004
+ }
1005
+
1006
+ pub fn walk_flat_map_generic_param < T : MutVisitor > (
1007
+ vis : & mut T ,
1008
+ mut param : GenericParam ,
1009
+ ) -> SmallVec < [ GenericParam ; 1 ] > {
1010
+ vis. visit_generic_param ( & mut param) ;
1003
1011
smallvec ! [ param]
1004
1012
}
1005
1013
0 commit comments