@@ -52,7 +52,7 @@ use smallvec::SmallVec;
5252use thin_vec:: ThinVec ;
5353
5454use crate :: inherent:: * ;
55- use crate :: { self as ty, Interner , TypeFlags } ;
55+ use crate :: { self as ty, Interner , TypeFlags , TypeFoldable } ;
5656
5757/// This trait is implemented for every type that can be visited,
5858/// providing the skeleton of the traversal.
@@ -94,7 +94,7 @@ pub trait TypeVisitor<I: Interner>: Sized {
9494 #[ cfg( not( feature = "nightly" ) ) ]
9595 type Result : VisitorResult ;
9696
97- fn visit_binder < T : TypeVisitable < I > > ( & mut self , t : & ty:: Binder < I , T > ) -> Self :: Result {
97+ fn visit_binder < T : TypeFoldable < I > > ( & mut self , t : & ty:: Binder < I , T > ) -> Self :: Result {
9898 t. super_visit_with ( self )
9999 }
100100
@@ -401,7 +401,7 @@ impl std::fmt::Debug for HasTypeFlagsVisitor {
401401impl < I : Interner > TypeVisitor < I > for HasTypeFlagsVisitor {
402402 type Result = ControlFlow < FoundFlags > ;
403403
404- fn visit_binder < T : TypeVisitable < I > > ( & mut self , t : & ty:: Binder < I , T > ) -> Self :: Result {
404+ fn visit_binder < T : TypeFoldable < I > > ( & mut self , t : & ty:: Binder < I , T > ) -> Self :: Result {
405405 // If we're looking for the HAS_BINDER_VARS flag, check if the
406406 // binder has vars. This won't be present in the binder's bound
407407 // value, so we need to check here too.
@@ -510,7 +510,7 @@ struct HasEscapingVarsVisitor {
510510impl < I : Interner > TypeVisitor < I > for HasEscapingVarsVisitor {
511511 type Result = ControlFlow < FoundEscapingVars > ;
512512
513- fn visit_binder < T : TypeVisitable < I > > ( & mut self , t : & ty:: Binder < I , T > ) -> Self :: Result {
513+ fn visit_binder < T : TypeFoldable < I > > ( & mut self , t : & ty:: Binder < I , T > ) -> Self :: Result {
514514 self . outer_index . shift_in ( 1 ) ;
515515 let result = t. super_visit_with ( self ) ;
516516 self . outer_index . shift_out ( 1 ) ;
0 commit comments