@@ -382,11 +382,19 @@ pub fn walk_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a Item) -> V::Resu
382
382
}
383
383
ItemKind :: MacCall ( mac) => try_visit ! ( visitor. visit_mac_call( mac) ) ,
384
384
ItemKind :: MacroDef ( ts) => try_visit ! ( visitor. visit_mac_def( ts, item. id) ) ,
385
- ItemKind :: Delegation ( box Delegation { id, qself, path, body } ) => {
385
+ ItemKind :: Delegation ( box Delegation { id, qself, path, kind , body } ) => {
386
386
if let Some ( qself) = qself {
387
387
try_visit ! ( visitor. visit_ty( & qself. ty) ) ;
388
388
}
389
389
try_visit ! ( visitor. visit_path( path, * id) ) ;
390
+ match kind {
391
+ DelegationKind :: Single => { }
392
+ DelegationKind :: List ( suffixes) => {
393
+ for ident in suffixes {
394
+ visitor. visit_ident ( * ident) ;
395
+ }
396
+ }
397
+ }
390
398
visit_opt ! ( visitor, visit_block, body) ;
391
399
}
392
400
ItemKind :: DelegationList ( box DelegationList { qself, prefix, suffixes, body } ) => {
@@ -792,11 +800,19 @@ pub fn walk_assoc_item<'a, V: Visitor<'a>>(
792
800
AssocItemKind :: MacCall ( mac) => {
793
801
try_visit ! ( visitor. visit_mac_call( mac) ) ;
794
802
}
795
- AssocItemKind :: Delegation ( box Delegation { id, qself, path, body } ) => {
803
+ AssocItemKind :: Delegation ( box Delegation { id, qself, path, kind , body } ) => {
796
804
if let Some ( qself) = qself {
797
805
try_visit ! ( visitor. visit_ty( & qself. ty) ) ;
798
806
}
799
807
try_visit ! ( visitor. visit_path( path, * id) ) ;
808
+ match kind {
809
+ DelegationKind :: Single => { }
810
+ DelegationKind :: List ( suffixes) => {
811
+ for ident in suffixes {
812
+ visitor. visit_ident ( * ident) ;
813
+ }
814
+ }
815
+ }
800
816
visit_opt ! ( visitor, visit_block, body) ;
801
817
}
802
818
AssocItemKind :: DelegationList ( box DelegationList { qself, prefix, suffixes, body } ) => {
0 commit comments