File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 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> {
764764 fn visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
765765 visitor. visit_predicate ( * self )
766766 }
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- }
777767}
778768
779769impl < ' 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;
4444use rustc_data_structures:: sso:: SsoHashSet ;
4545use std:: ops:: ControlFlow ;
4646
47- pub trait TypeVisitable < ' tcx > = ir:: TypeVisitable < ' tcx > ;
47+ pub trait TypeVisitable < ' tcx > = ir:: TypeVisitable < ' tcx > + ir :: TypeVisitableExt < ' tcx > ;
4848pub trait TypeSuperVisitable < ' tcx > = ir:: TypeSuperVisitable < ' tcx > ;
4949pub trait TypeVisitor < ' tcx > = ir:: TypeVisitor < ' tcx > ;
5050
@@ -74,7 +74,9 @@ pub mod ir {
7474 /// `V::visit_ty`). This is where control transfers from `TypeFoldable` to
7575 /// `TypeVisitor`.
7676 fn visit_with < V : TypeVisitor < ' tcx > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > ;
77+ }
7778
79+ pub trait TypeVisitableExt < ' tcx > : TypeVisitable < ' tcx > {
7880 /// Returns `true` if `self` has any late-bound regions that are either
7981 /// bound by `binder` or bound by some binder outside of `binder`.
8082 /// If `binder` is `ty::INNERMOST`, this indicates whether
@@ -197,6 +199,8 @@ pub mod ir {
197199 }
198200 }
199201
202+ impl < ' tcx , T : TypeVisitable < ' tcx > > TypeVisitableExt < ' tcx > for T { }
203+
200204 pub trait TypeSuperVisitable < ' tcx > : TypeVisitable < ' tcx > {
201205 /// Provides a default visit for a type of interest. This should only be
202206 /// called within `TypeVisitor` methods, when a non-custom traversal is
You can’t perform that action at this time.
0 commit comments