File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -1067,6 +1067,14 @@ macro_rules! make_ast_visitor {
1067
1067
return_result!( V )
1068
1068
}
1069
1069
1070
+ pub fn walk_item<$( $lt, ) ? V : $trait$( <$lt>) ?, I : WalkItemKind >(
1071
+ visitor: & mut V ,
1072
+ item: ref_t!( Item <I >)
1073
+ ) -> result!( V ) {
1074
+ I :: walk( item, visitor) ;
1075
+ return_result!( V )
1076
+ }
1077
+
1070
1078
derive_copy_clone!{
1071
1079
#[ derive( Debug ) ]
1072
1080
pub enum FnKind <' a> {
@@ -1319,14 +1327,6 @@ pub mod visit {
1319
1327
}
1320
1328
}
1321
1329
1322
- pub fn walk_item < ' a , V : Visitor < ' a > , I : WalkItemKind > (
1323
- visitor : & mut V ,
1324
- item : & ' a Item < I > ,
1325
- ) -> V :: Result {
1326
- try_visit ! ( I :: walk( item, visitor) ) ;
1327
- V :: Result :: output ( )
1328
- }
1329
-
1330
1330
pub fn walk_ty < ' a , V : Visitor < ' a > > ( visitor : & mut V , typ : & ' a Ty ) -> V :: Result {
1331
1331
let Ty { id, kind, span : _, tokens : _ } = typ;
1332
1332
match kind {
@@ -2427,9 +2427,6 @@ pub mod mut_visit {
2427
2427
visit_safety ( vis, safety) ;
2428
2428
}
2429
2429
2430
- pub fn walk_item < K : WalkItemKind > ( visitor : & mut impl MutVisitor , item : & mut Item < K > ) {
2431
- K :: walk ( item, visitor) ;
2432
- }
2433
2430
/// Mutates one item, returning the item again.
2434
2431
pub fn walk_flat_map_item < K : WalkItemKind > (
2435
2432
visitor : & mut impl MutVisitor ,
You can’t perform that action at this time.
0 commit comments