File tree 2 files changed +5
-11
lines changed
compiler/rustc_middle/src/ty
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -764,16 +764,6 @@ impl<'tcx> ir::TypeVisitable<'tcx> for ty::Predicate<'tcx> {
764
764
fn visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
765
765
visitor. visit_predicate ( * self )
766
766
}
767
-
768
- #[ inline]
769
- fn has_vars_bound_at_or_above ( & self , binder : ty:: DebruijnIndex ) -> bool {
770
- self . outer_exclusive_binder ( ) > binder
771
- }
772
-
773
- #[ inline]
774
- fn has_type_flags ( & self , flags : ty:: TypeFlags ) -> bool {
775
- self . flags ( ) . intersects ( flags)
776
- }
777
767
}
778
768
779
769
impl < ' tcx > TypeSuperFoldable < ' tcx > for ty:: Predicate < ' tcx > {
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ use rustc_data_structures::fx::FxHashSet;
44
44
use rustc_data_structures:: sso:: SsoHashSet ;
45
45
use std:: ops:: ControlFlow ;
46
46
47
- pub trait TypeVisitable < ' tcx > = ir:: TypeVisitable < ' tcx > ;
47
+ pub trait TypeVisitable < ' tcx > = ir:: TypeVisitable < ' tcx > + ir :: TypeVisitableExt < ' tcx > ;
48
48
pub trait TypeSuperVisitable < ' tcx > = ir:: TypeSuperVisitable < ' tcx > ;
49
49
pub trait TypeVisitor < ' tcx > = ir:: TypeVisitor < ' tcx > ;
50
50
@@ -74,7 +74,9 @@ pub mod ir {
74
74
/// `V::visit_ty`). This is where control transfers from `TypeFoldable` to
75
75
/// `TypeVisitor`.
76
76
fn visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > ;
77
+ }
77
78
79
+ pub trait TypeVisitableExt < ' tcx > : TypeVisitable < ' tcx > {
78
80
/// Returns `true` if `self` has any late-bound regions that are either
79
81
/// bound by `binder` or bound by some binder outside of `binder`.
80
82
/// If `binder` is `ty::INNERMOST`, this indicates whether
@@ -197,6 +199,8 @@ pub mod ir {
197
199
}
198
200
}
199
201
202
+ impl < ' tcx , T : TypeVisitable < ' tcx > > TypeVisitableExt < ' tcx > for T { }
203
+
200
204
pub trait TypeSuperVisitable < ' tcx > : TypeVisitable < ' tcx > {
201
205
/// Provides a default visit for a type of interest. This should only be
202
206
/// called within `TypeVisitor` methods, when a non-custom traversal is
You can’t perform that action at this time.
0 commit comments