@@ -450,7 +450,7 @@ pub fn walk_poly_trait_ref<'v, V>(
450450) where
451451 V : Visitor < ' v > ,
452452{
453- walk_list ! ( visitor, visit_generic_param, & trait_ref. bound_generic_params) ;
453+ walk_list ! ( visitor, visit_generic_param, trait_ref. bound_generic_params) ;
454454 visitor. visit_trait_ref ( & trait_ref. trait_ref ) ;
455455}
456456
@@ -509,7 +509,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) {
509509 visitor. visit_ty ( ty) ;
510510 visitor. visit_generics ( generics)
511511 }
512- ItemKind :: OpaqueTy ( OpaqueTy { ref generics, ref bounds, .. } ) => {
512+ ItemKind :: OpaqueTy ( OpaqueTy { ref generics, bounds, .. } ) => {
513513 visitor. visit_id ( item. hir_id ) ;
514514 walk_generics ( visitor, generics) ;
515515 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>) {
538538 item. span ,
539539 ) ;
540540 }
541- ItemKind :: Trait ( .., ref generics, ref bounds, trait_item_refs) => {
541+ ItemKind :: Trait ( .., ref generics, bounds, trait_item_refs) => {
542542 visitor. visit_id ( item. hir_id ) ;
543543 visitor. visit_generics ( generics) ;
544544 walk_list ! ( visitor, visit_param_bound, bounds) ;
545545 walk_list ! ( visitor, visit_trait_item_ref, trait_item_refs) ;
546546 }
547- ItemKind :: TraitAlias ( ref generics, ref bounds) => {
547+ ItemKind :: TraitAlias ( ref generics, bounds) => {
548548 visitor. visit_id ( item. hir_id ) ;
549549 visitor. visit_generics ( generics) ;
550550 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>) {
598598 visitor. visit_ty ( & mutable_type. ty )
599599 }
600600 TyKind :: Never => { }
601- TyKind :: Tup ( ref tuple_element_types) => {
601+ TyKind :: Tup ( tuple_element_types) => {
602602 walk_list ! ( visitor, visit_ty, tuple_element_types) ;
603603 }
604604 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) ;
606606 visitor. visit_fn_decl ( & function_declaration. decl ) ;
607607 }
608608 TyKind :: Path ( ref qpath) => {
609609 visitor. visit_qpath ( qpath, typ. hir_id , typ. span ) ;
610610 }
611- TyKind :: Def ( item_id, ref lifetimes) => {
611+ TyKind :: Def ( item_id, lifetimes) => {
612612 visitor. visit_nested_item ( item_id) ;
613613 walk_list ! ( visitor, visit_generic_arg, lifetimes) ;
614614 }
615615 TyKind :: Array ( ref ty, ref length) => {
616616 visitor. visit_ty ( ty) ;
617617 visitor. visit_anon_const ( length)
618618 }
619- TyKind :: TraitObject ( ref bounds, ref lifetime) => {
619+ TyKind :: TraitObject ( bounds, ref lifetime) => {
620620 for bound in bounds {
621621 visitor. visit_poly_trait_ref ( bound, TraitBoundModifier :: None ) ;
622622 }
@@ -648,7 +648,7 @@ pub fn walk_qpath<'v, V: Visitor<'v>>(
648648}
649649
650650pub 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 {
652652 visitor. visit_path_segment ( path. span , segment) ;
653653 }
654654}
@@ -673,7 +673,7 @@ pub fn walk_generic_args<'v, V: Visitor<'v>>(
673673 generic_args : & ' v GenericArgs < ' v > ,
674674) {
675675 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) ;
677677}
678678
679679pub fn walk_assoc_type_binding < ' v , V : Visitor < ' v > > (
@@ -686,7 +686,7 @@ pub fn walk_assoc_type_binding<'v, V: Visitor<'v>>(
686686 TypeBindingKind :: Equality { ref ty } => {
687687 visitor. visit_ty ( ty) ;
688688 }
689- TypeBindingKind :: Constraint { ref bounds } => {
689+ TypeBindingKind :: Constraint { bounds } => {
690690 walk_list ! ( visitor, visit_param_bound, bounds) ;
691691 }
692692 }
@@ -766,7 +766,7 @@ pub fn walk_param_bound<'v, V: Visitor<'v>>(visitor: &mut V, bound: &'v GenericB
766766
767767pub fn walk_generic_param < ' v , V : Visitor < ' v > > ( visitor : & mut V , param : & ' v GenericParam < ' v > ) {
768768 visitor. visit_id ( param. hir_id ) ;
769- walk_list ! ( visitor, visit_attribute, & param. attrs) ;
769+ walk_list ! ( visitor, visit_attribute, param. attrs) ;
770770 match param. name {
771771 ParamName :: Plain ( ident) => visitor. visit_ident ( ident) ,
772772 ParamName :: Error | ParamName :: Fresh ( _) => { }
@@ -776,12 +776,12 @@ pub fn walk_generic_param<'v, V: Visitor<'v>>(visitor: &mut V, param: &'v Generi
776776 GenericParamKind :: Type { ref default, .. } => walk_list ! ( visitor, visit_ty, default ) ,
777777 GenericParamKind :: Const { ref ty } => visitor. visit_ty ( ty) ,
778778 }
779- walk_list ! ( visitor, visit_param_bound, & param. bounds) ;
779+ walk_list ! ( visitor, visit_param_bound, param. bounds) ;
780780}
781781
782782pub fn walk_generics < ' v , V : Visitor < ' v > > ( visitor : & mut V , generics : & ' v Generics < ' v > ) {
783783 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) ;
785785}
786786
787787pub fn walk_where_predicate < ' v , V : Visitor < ' v > > (
@@ -791,17 +791,15 @@ pub fn walk_where_predicate<'v, V: Visitor<'v>>(
791791 match predicate {
792792 & WherePredicate :: BoundPredicate ( WhereBoundPredicate {
793793 ref bounded_ty,
794- ref bounds,
795- ref bound_generic_params,
794+ bounds,
795+ bound_generic_params,
796796 ..
797797 } ) => {
798798 visitor. visit_ty ( bounded_ty) ;
799799 walk_list ! ( visitor, visit_param_bound, bounds) ;
800800 walk_list ! ( visitor, visit_generic_param, bound_generic_params) ;
801801 }
802- & WherePredicate :: RegionPredicate ( WhereRegionPredicate {
803- ref lifetime, ref bounds, ..
804- } ) => {
802+ & WherePredicate :: RegionPredicate ( WhereRegionPredicate { ref lifetime, bounds, .. } ) => {
805803 visitor. visit_lifetime ( lifetime) ;
806804 walk_list ! ( visitor, visit_param_bound, bounds) ;
807805 }
@@ -822,7 +820,7 @@ pub fn walk_fn_ret_ty<'v, V: Visitor<'v>>(visitor: &mut V, ret_ty: &'v FunctionR
822820}
823821
824822pub 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 {
826824 visitor. visit_ty ( ty)
827825 }
828826 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
877875 trait_item. hir_id ,
878876 ) ;
879877 }
880- TraitItemKind :: Type ( ref bounds, ref default) => {
878+ TraitItemKind :: Type ( bounds, ref default) => {
881879 visitor. visit_id ( trait_item. hir_id ) ;
882880 walk_list ! ( visitor, visit_param_bound, bounds) ;
883881 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
931929 visitor. visit_id ( impl_item. hir_id ) ;
932930 visitor. visit_ty ( ty) ;
933931 }
934- ImplItemKind :: OpaqueTy ( ref bounds) => {
932+ ImplItemKind :: OpaqueTy ( bounds) => {
935933 visitor. visit_id ( impl_item. hir_id ) ;
936934 walk_list ! ( visitor, visit_param_bound, bounds) ;
937935 }
0 commit comments