@@ -301,7 +301,7 @@ pub trait Visitor<'v> : Sized {
301301 fn visit_ty_param_bound ( & mut self , bounds : & ' v TyParamBound ) {
302302 walk_ty_param_bound ( self , bounds)
303303 }
304- fn visit_poly_trait_ref ( & mut self , t : & ' v PolyTraitRef , m : & ' v TraitBoundModifier ) {
304+ fn visit_poly_trait_ref ( & mut self , t : & ' v PolyTraitRef , m : TraitBoundModifier ) {
305305 walk_poly_trait_ref ( self , t, m)
306306 }
307307 fn visit_variant_data ( & mut self ,
@@ -421,7 +421,7 @@ pub fn walk_lifetime_def<'v, V: Visitor<'v>>(visitor: &mut V, lifetime_def: &'v
421421
422422pub fn walk_poly_trait_ref < ' v , V > ( visitor : & mut V ,
423423 trait_ref : & ' v PolyTraitRef ,
424- _modifier : & ' v TraitBoundModifier )
424+ _modifier : TraitBoundModifier )
425425 where V : Visitor < ' v >
426426{
427427 walk_list ! ( visitor, visit_lifetime_def, & trait_ref. bound_lifetimes) ;
@@ -566,8 +566,11 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
566566 visitor. visit_ty ( ty) ;
567567 visitor. visit_nested_body ( length)
568568 }
569- TyTraitObject ( ref bounds) => {
570- walk_list ! ( visitor, visit_ty_param_bound, bounds) ;
569+ TyTraitObject ( ref bounds, ref lifetime) => {
570+ for bound in bounds {
571+ visitor. visit_poly_trait_ref ( bound, TraitBoundModifier :: None ) ;
572+ }
573+ visitor. visit_lifetime ( lifetime) ;
571574 }
572575 TyImplTrait ( ref bounds) => {
573576 walk_list ! ( visitor, visit_ty_param_bound, bounds) ;
@@ -695,7 +698,7 @@ pub fn walk_foreign_item<'v, V: Visitor<'v>>(visitor: &mut V, foreign_item: &'v
695698
696699pub fn walk_ty_param_bound < ' v , V : Visitor < ' v > > ( visitor : & mut V , bound : & ' v TyParamBound ) {
697700 match * bound {
698- TraitTyParamBound ( ref typ, ref modifier) => {
701+ TraitTyParamBound ( ref typ, modifier) => {
699702 visitor. visit_poly_trait_ref ( typ, modifier) ;
700703 }
701704 RegionTyParamBound ( ref lifetime) => {
0 commit comments