@@ -52,7 +52,7 @@ use smallvec::SmallVec;
52
52
use thin_vec:: ThinVec ;
53
53
54
54
use crate :: inherent:: * ;
55
- use crate :: { self as ty, Interner , TypeFlags } ;
55
+ use crate :: { self as ty, Interner , TypeFlags , TypeFoldable } ;
56
56
57
57
/// This trait is implemented for every type that can be visited,
58
58
/// providing the skeleton of the traversal.
@@ -94,7 +94,7 @@ pub trait TypeVisitor<I: Interner>: Sized {
94
94
#[ cfg( not( feature = "nightly" ) ) ]
95
95
type Result : VisitorResult ;
96
96
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 {
98
98
t. super_visit_with ( self )
99
99
}
100
100
@@ -401,7 +401,7 @@ impl std::fmt::Debug for HasTypeFlagsVisitor {
401
401
impl < I : Interner > TypeVisitor < I > for HasTypeFlagsVisitor {
402
402
type Result = ControlFlow < FoundFlags > ;
403
403
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 {
405
405
// If we're looking for the HAS_BINDER_VARS flag, check if the
406
406
// binder has vars. This won't be present in the binder's bound
407
407
// value, so we need to check here too.
@@ -510,7 +510,7 @@ struct HasEscapingVarsVisitor {
510
510
impl < I : Interner > TypeVisitor < I > for HasEscapingVarsVisitor {
511
511
type Result = ControlFlow < FoundEscapingVars > ;
512
512
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 {
514
514
self . outer_index . shift_in ( 1 ) ;
515
515
let result = t. super_visit_with ( self ) ;
516
516
self . outer_index . shift_out ( 1 ) ;
0 commit comments