@@ -450,7 +450,7 @@ pub fn walk_poly_trait_ref<'v, V>(
450
450
) where
451
451
V : Visitor < ' v > ,
452
452
{
453
- walk_list ! ( visitor, visit_generic_param, & trait_ref. bound_generic_params) ;
453
+ walk_list ! ( visitor, visit_generic_param, trait_ref. bound_generic_params) ;
454
454
visitor. visit_trait_ref ( & trait_ref. trait_ref ) ;
455
455
}
456
456
@@ -509,7 +509,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) {
509
509
visitor. visit_ty ( ty) ;
510
510
visitor. visit_generics ( generics)
511
511
}
512
- ItemKind :: OpaqueTy ( OpaqueTy { ref generics, ref bounds, .. } ) => {
512
+ ItemKind :: OpaqueTy ( OpaqueTy { ref generics, bounds, .. } ) => {
513
513
visitor. visit_id ( item. hir_id ) ;
514
514
walk_generics ( visitor, generics) ;
515
515
walk_list ! ( visitor, visit_param_bound, bounds) ;
@@ -538,13 +538,13 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) {
538
538
item. span ,
539
539
) ;
540
540
}
541
- ItemKind :: Trait ( .., ref generics, ref bounds, trait_item_refs) => {
541
+ ItemKind :: Trait ( .., ref generics, bounds, trait_item_refs) => {
542
542
visitor. visit_id ( item. hir_id ) ;
543
543
visitor. visit_generics ( generics) ;
544
544
walk_list ! ( visitor, visit_param_bound, bounds) ;
545
545
walk_list ! ( visitor, visit_trait_item_ref, trait_item_refs) ;
546
546
}
547
- ItemKind :: TraitAlias ( ref generics, ref bounds) => {
547
+ ItemKind :: TraitAlias ( ref generics, bounds) => {
548
548
visitor. visit_id ( item. hir_id ) ;
549
549
visitor. visit_generics ( generics) ;
550
550
walk_list ! ( visitor, visit_param_bound, bounds) ;
@@ -598,25 +598,25 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) {
598
598
visitor. visit_ty ( & mutable_type. ty )
599
599
}
600
600
TyKind :: Never => { }
601
- TyKind :: Tup ( ref tuple_element_types) => {
601
+ TyKind :: Tup ( tuple_element_types) => {
602
602
walk_list ! ( visitor, visit_ty, tuple_element_types) ;
603
603
}
604
604
TyKind :: BareFn ( ref function_declaration) => {
605
- walk_list ! ( visitor, visit_generic_param, & function_declaration. generic_params) ;
605
+ walk_list ! ( visitor, visit_generic_param, function_declaration. generic_params) ;
606
606
visitor. visit_fn_decl ( & function_declaration. decl ) ;
607
607
}
608
608
TyKind :: Path ( ref qpath) => {
609
609
visitor. visit_qpath ( qpath, typ. hir_id , typ. span ) ;
610
610
}
611
- TyKind :: Def ( item_id, ref lifetimes) => {
611
+ TyKind :: Def ( item_id, lifetimes) => {
612
612
visitor. visit_nested_item ( item_id) ;
613
613
walk_list ! ( visitor, visit_generic_arg, lifetimes) ;
614
614
}
615
615
TyKind :: Array ( ref ty, ref length) => {
616
616
visitor. visit_ty ( ty) ;
617
617
visitor. visit_anon_const ( length)
618
618
}
619
- TyKind :: TraitObject ( ref bounds, ref lifetime) => {
619
+ TyKind :: TraitObject ( bounds, ref lifetime) => {
620
620
for bound in bounds {
621
621
visitor. visit_poly_trait_ref ( bound, TraitBoundModifier :: None ) ;
622
622
}
@@ -648,7 +648,7 @@ pub fn walk_qpath<'v, V: Visitor<'v>>(
648
648
}
649
649
650
650
pub fn walk_path < ' v , V : Visitor < ' v > > ( visitor : & mut V , path : & ' v Path < ' v > ) {
651
- for segment in & path. segments {
651
+ for segment in path. segments {
652
652
visitor. visit_path_segment ( path. span , segment) ;
653
653
}
654
654
}
@@ -673,7 +673,7 @@ pub fn walk_generic_args<'v, V: Visitor<'v>>(
673
673
generic_args : & ' v GenericArgs < ' v > ,
674
674
) {
675
675
walk_list ! ( visitor, visit_generic_arg, & generic_args. args) ;
676
- walk_list ! ( visitor, visit_assoc_type_binding, & generic_args. bindings) ;
676
+ walk_list ! ( visitor, visit_assoc_type_binding, generic_args. bindings) ;
677
677
}
678
678
679
679
pub fn walk_assoc_type_binding < ' v , V : Visitor < ' v > > (
@@ -686,7 +686,7 @@ pub fn walk_assoc_type_binding<'v, V: Visitor<'v>>(
686
686
TypeBindingKind :: Equality { ref ty } => {
687
687
visitor. visit_ty ( ty) ;
688
688
}
689
- TypeBindingKind :: Constraint { ref bounds } => {
689
+ TypeBindingKind :: Constraint { bounds } => {
690
690
walk_list ! ( visitor, visit_param_bound, bounds) ;
691
691
}
692
692
}
@@ -766,7 +766,7 @@ pub fn walk_param_bound<'v, V: Visitor<'v>>(visitor: &mut V, bound: &'v GenericB
766
766
767
767
pub fn walk_generic_param < ' v , V : Visitor < ' v > > ( visitor : & mut V , param : & ' v GenericParam < ' v > ) {
768
768
visitor. visit_id ( param. hir_id ) ;
769
- walk_list ! ( visitor, visit_attribute, & param. attrs) ;
769
+ walk_list ! ( visitor, visit_attribute, param. attrs) ;
770
770
match param. name {
771
771
ParamName :: Plain ( ident) => visitor. visit_ident ( ident) ,
772
772
ParamName :: Error | ParamName :: Fresh ( _) => { }
@@ -776,12 +776,12 @@ pub fn walk_generic_param<'v, V: Visitor<'v>>(visitor: &mut V, param: &'v Generi
776
776
GenericParamKind :: Type { ref default, .. } => walk_list ! ( visitor, visit_ty, default ) ,
777
777
GenericParamKind :: Const { ref ty } => visitor. visit_ty ( ty) ,
778
778
}
779
- walk_list ! ( visitor, visit_param_bound, & param. bounds) ;
779
+ walk_list ! ( visitor, visit_param_bound, param. bounds) ;
780
780
}
781
781
782
782
pub fn walk_generics < ' v , V : Visitor < ' v > > ( visitor : & mut V , generics : & ' v Generics < ' v > ) {
783
783
walk_list ! ( visitor, visit_generic_param, & generics. params) ;
784
- walk_list ! ( visitor, visit_where_predicate, & generics. where_clause. predicates) ;
784
+ walk_list ! ( visitor, visit_where_predicate, generics. where_clause. predicates) ;
785
785
}
786
786
787
787
pub fn walk_where_predicate < ' v , V : Visitor < ' v > > (
@@ -791,17 +791,15 @@ pub fn walk_where_predicate<'v, V: Visitor<'v>>(
791
791
match predicate {
792
792
& WherePredicate :: BoundPredicate ( WhereBoundPredicate {
793
793
ref bounded_ty,
794
- ref bounds,
795
- ref bound_generic_params,
794
+ bounds,
795
+ bound_generic_params,
796
796
..
797
797
} ) => {
798
798
visitor. visit_ty ( bounded_ty) ;
799
799
walk_list ! ( visitor, visit_param_bound, bounds) ;
800
800
walk_list ! ( visitor, visit_generic_param, bound_generic_params) ;
801
801
}
802
- & WherePredicate :: RegionPredicate ( WhereRegionPredicate {
803
- ref lifetime, ref bounds, ..
804
- } ) => {
802
+ & WherePredicate :: RegionPredicate ( WhereRegionPredicate { ref lifetime, bounds, .. } ) => {
805
803
visitor. visit_lifetime ( lifetime) ;
806
804
walk_list ! ( visitor, visit_param_bound, bounds) ;
807
805
}
@@ -822,7 +820,7 @@ pub fn walk_fn_ret_ty<'v, V: Visitor<'v>>(visitor: &mut V, ret_ty: &'v FunctionR
822
820
}
823
821
824
822
pub fn walk_fn_decl < ' v , V : Visitor < ' v > > ( visitor : & mut V , function_declaration : & ' v FnDecl < ' v > ) {
825
- for ty in & function_declaration. inputs {
823
+ for ty in function_declaration. inputs {
826
824
visitor. visit_ty ( ty)
827
825
}
828
826
walk_fn_ret_ty ( visitor, & function_declaration. output )
@@ -877,7 +875,7 @@ pub fn walk_trait_item<'v, V: Visitor<'v>>(visitor: &mut V, trait_item: &'v Trai
877
875
trait_item. hir_id ,
878
876
) ;
879
877
}
880
- TraitItemKind :: Type ( ref bounds, ref default) => {
878
+ TraitItemKind :: Type ( bounds, ref default) => {
881
879
visitor. visit_id ( trait_item. hir_id ) ;
882
880
walk_list ! ( visitor, visit_param_bound, bounds) ;
883
881
walk_list ! ( visitor, visit_ty, default ) ;
@@ -931,7 +929,7 @@ pub fn walk_impl_item<'v, V: Visitor<'v>>(visitor: &mut V, impl_item: &'v ImplIt
931
929
visitor. visit_id ( impl_item. hir_id ) ;
932
930
visitor. visit_ty ( ty) ;
933
931
}
934
- ImplItemKind :: OpaqueTy ( ref bounds) => {
932
+ ImplItemKind :: OpaqueTy ( bounds) => {
935
933
visitor. visit_id ( impl_item. hir_id ) ;
936
934
walk_list ! ( visitor, visit_param_bound, bounds) ;
937
935
}
0 commit comments