@@ -195,7 +195,6 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
195195 fn visit_ty ( & mut self , ty : & hir:: Ty ) {
196196 match ty. node {
197197 hir:: TyBareFn ( ref c) => {
198- visit:: walk_lifetime_decls_helper ( self , & c. lifetimes ) ;
199198 self . with ( LateScope ( & c. lifetimes , self . scope ) , |old_scope, this| {
200199 // a bare fn has no bounds, so everything
201200 // contained within is scoped within its binder.
@@ -245,7 +244,7 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
245244 |_, this| visit:: walk_block ( this, b) ) ;
246245 }
247246
248- fn visit_lifetime_ref ( & mut self , lifetime_ref : & hir:: Lifetime ) {
247+ fn visit_lifetime ( & mut self , lifetime_ref : & hir:: Lifetime ) {
249248 if lifetime_ref. name == special_idents:: static_lifetime. name {
250249 self . insert_lifetime ( lifetime_ref, DefStaticRegion ) ;
251250 return ;
@@ -255,7 +254,7 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
255254
256255 fn visit_generics ( & mut self , generics : & hir:: Generics ) {
257256 for ty_param in generics. ty_params . iter ( ) {
258- visit :: walk_ty_param_bounds_helper ( self , & ty_param. bounds ) ;
257+ walk_list ! ( self , visit_ty_param_bound , & ty_param. bounds) ;
259258 match ty_param. default {
260259 Some ( ref ty) => self . visit_ty ( & * * ty) ,
261260 None => { }
@@ -273,22 +272,22 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
273272 |old_scope, this| {
274273 this. check_lifetime_defs ( old_scope, bound_lifetimes) ;
275274 this. visit_ty ( & * * bounded_ty) ;
276- visit :: walk_ty_param_bounds_helper ( this, bounds) ;
275+ walk_list ! ( this, visit_ty_param_bound , bounds) ;
277276 } ) ;
278277 self . trait_ref_hack = false ;
279278 result
280279 } else {
281280 self . visit_ty ( & * * bounded_ty) ;
282- visit :: walk_ty_param_bounds_helper ( self , bounds) ;
281+ walk_list ! ( self , visit_ty_param_bound , bounds) ;
283282 }
284283 }
285284 & hir:: WherePredicate :: RegionPredicate ( hir:: WhereRegionPredicate { ref lifetime,
286285 ref bounds,
287286 .. } ) => {
288287
289- self . visit_lifetime_ref ( lifetime) ;
288+ self . visit_lifetime ( lifetime) ;
290289 for bound in bounds {
291- self . visit_lifetime_ref ( bound) ;
290+ self . visit_lifetime ( bound) ;
292291 }
293292 }
294293 & hir:: WherePredicate :: EqPredicate ( hir:: WhereEqPredicate { id,
@@ -799,23 +798,23 @@ fn early_bound_lifetime_names(generics: &hir::Generics) -> Vec<ast::Name> {
799798 FreeLifetimeCollector { early_bound : & mut early_bound,
800799 late_bound : & mut late_bound } ;
801800 for ty_param in generics. ty_params . iter ( ) {
802- visit :: walk_ty_param_bounds_helper ( & mut collector, & ty_param. bounds ) ;
801+ walk_list ! ( & mut collector, visit_ty_param_bound , & ty_param. bounds) ;
803802 }
804803 for predicate in & generics. where_clause . predicates {
805804 match predicate {
806805 & hir:: WherePredicate :: BoundPredicate ( hir:: WhereBoundPredicate { ref bounds,
807806 ref bounded_ty,
808807 ..} ) => {
809808 collector. visit_ty ( & * * bounded_ty) ;
810- visit :: walk_ty_param_bounds_helper ( & mut collector, bounds) ;
809+ walk_list ! ( & mut collector, visit_ty_param_bound , bounds) ;
811810 }
812811 & hir:: WherePredicate :: RegionPredicate ( hir:: WhereRegionPredicate { ref lifetime,
813812 ref bounds,
814813 ..} ) => {
815- collector. visit_lifetime_ref ( lifetime) ;
814+ collector. visit_lifetime ( lifetime) ;
816815
817816 for bound in bounds {
818- collector. visit_lifetime_ref ( bound) ;
817+ collector. visit_lifetime ( bound) ;
819818 }
820819 }
821820 & hir:: WherePredicate :: EqPredicate ( _) => unimplemented ! ( )
@@ -843,7 +842,7 @@ fn early_bound_lifetime_names(generics: &hir::Generics) -> Vec<ast::Name> {
843842 }
844843
845844 impl < ' a , ' v > Visitor < ' v > for FreeLifetimeCollector < ' a > {
846- fn visit_lifetime_ref ( & mut self , lifetime_ref : & hir:: Lifetime ) {
845+ fn visit_lifetime ( & mut self , lifetime_ref : & hir:: Lifetime ) {
847846 shuffle ( self . early_bound , self . late_bound ,
848847 lifetime_ref. name ) ;
849848 }
0 commit comments