@@ -8,7 +8,7 @@ use crate::ty::subst::{GenericArg, InternalSubsts, Subst, SubstsRef};
8
8
use crate :: ty:: InferTy :: * ;
9
9
use crate :: ty:: {
10
10
self , AdtDef , DefIdTree , Discr , Term , Ty , TyCtxt , TypeFlags , TypeFoldable , TypeSuperFoldable ,
11
- TypeVisitor ,
11
+ TypeVisitable , TypeVisitor ,
12
12
} ;
13
13
use crate :: ty:: { List , ParamEnv } ;
14
14
use polonius_engine:: Atom ;
@@ -986,7 +986,7 @@ pub struct Binder<'tcx, T>(T, &'tcx List<BoundVariableKind>);
986
986
987
987
impl < ' tcx , T > Binder < ' tcx , T >
988
988
where
989
- T : TypeFoldable < ' tcx > ,
989
+ T : TypeVisitable < ' tcx > ,
990
990
{
991
991
/// Wraps `value` in a binder, asserting that `value` does not
992
992
/// contain any bound vars that would be bound by the
@@ -1050,14 +1050,14 @@ impl<'tcx, T> Binder<'tcx, T> {
1050
1050
Binder ( value, self . 1 )
1051
1051
}
1052
1052
1053
- pub fn map_bound_ref < F , U : TypeFoldable < ' tcx > > ( & self , f : F ) -> Binder < ' tcx , U >
1053
+ pub fn map_bound_ref < F , U : TypeVisitable < ' tcx > > ( & self , f : F ) -> Binder < ' tcx , U >
1054
1054
where
1055
1055
F : FnOnce ( & T ) -> U ,
1056
1056
{
1057
1057
self . as_ref ( ) . map_bound ( f)
1058
1058
}
1059
1059
1060
- pub fn map_bound < F , U : TypeFoldable < ' tcx > > ( self , f : F ) -> Binder < ' tcx , U >
1060
+ pub fn map_bound < F , U : TypeVisitable < ' tcx > > ( self , f : F ) -> Binder < ' tcx , U >
1061
1061
where
1062
1062
F : FnOnce ( T ) -> U ,
1063
1063
{
@@ -1069,7 +1069,7 @@ impl<'tcx, T> Binder<'tcx, T> {
1069
1069
Binder ( value, self . 1 )
1070
1070
}
1071
1071
1072
- pub fn try_map_bound < F , U : TypeFoldable < ' tcx > , E > ( self , f : F ) -> Result < Binder < ' tcx , U > , E >
1072
+ pub fn try_map_bound < F , U : TypeVisitable < ' tcx > , E > ( self , f : F ) -> Result < Binder < ' tcx , U > , E >
1073
1073
where
1074
1074
F : FnOnce ( T ) -> Result < U , E > ,
1075
1075
{
@@ -1092,7 +1092,7 @@ impl<'tcx, T> Binder<'tcx, T> {
1092
1092
/// in `bind`. This may be (debug) asserted in the future.
1093
1093
pub fn rebind < U > ( & self , value : U ) -> Binder < ' tcx , U >
1094
1094
where
1095
- U : TypeFoldable < ' tcx > ,
1095
+ U : TypeVisitable < ' tcx > ,
1096
1096
{
1097
1097
if cfg ! ( debug_assertions) {
1098
1098
let mut validator = ValidateBoundVars :: new ( self . bound_vars ( ) ) ;
@@ -1113,7 +1113,7 @@ impl<'tcx, T> Binder<'tcx, T> {
1113
1113
/// would not be that useful.)
1114
1114
pub fn no_bound_vars ( self ) -> Option < T >
1115
1115
where
1116
- T : TypeFoldable < ' tcx > ,
1116
+ T : TypeVisitable < ' tcx > ,
1117
1117
{
1118
1118
if self . 0 . has_escaping_bound_vars ( ) { None } else { Some ( self . skip_binder ( ) ) }
1119
1119
}
0 commit comments