@@ -837,6 +837,7 @@ impl<'tcx> TypeVisitor<'tcx> for HasEscapingVarsVisitor {
837
837
result
838
838
}
839
839
840
+ #[ inline]
840
841
fn visit_ty ( & mut self , t : Ty < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
841
842
// If the outer-exclusive-binder is *strictly greater* than
842
843
// `outer_index`, that means that `t` contains some content
@@ -850,6 +851,7 @@ impl<'tcx> TypeVisitor<'tcx> for HasEscapingVarsVisitor {
850
851
}
851
852
}
852
853
854
+ #[ inline]
853
855
fn visit_region ( & mut self , r : ty:: Region < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
854
856
// If the region is bound by `outer_index` or anything outside
855
857
// of outer index, then it escapes the binders we have
@@ -875,6 +877,7 @@ impl<'tcx> TypeVisitor<'tcx> for HasEscapingVarsVisitor {
875
877
}
876
878
}
877
879
880
+ #[ inline]
878
881
fn visit_predicate ( & mut self , predicate : ty:: Predicate < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
879
882
if predicate. inner . outer_exclusive_binder > self . outer_index {
880
883
ControlFlow :: Break ( FoundEscapingVars )
@@ -895,6 +898,7 @@ struct HasTypeFlagsVisitor {
895
898
impl < ' tcx > TypeVisitor < ' tcx > for HasTypeFlagsVisitor {
896
899
type BreakTy = FoundFlags ;
897
900
901
+ #[ inline]
898
902
fn visit_ty ( & mut self , t : Ty < ' _ > ) -> ControlFlow < Self :: BreakTy > {
899
903
debug ! (
900
904
"HasTypeFlagsVisitor: t={:?} t.flags={:?} self.flags={:?}" ,
@@ -909,6 +913,7 @@ impl<'tcx> TypeVisitor<'tcx> for HasTypeFlagsVisitor {
909
913
}
910
914
}
911
915
916
+ #[ inline]
912
917
fn visit_region ( & mut self , r : ty:: Region < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
913
918
let flags = r. type_flags ( ) ;
914
919
debug ! ( "HasTypeFlagsVisitor: r={:?} r.flags={:?} self.flags={:?}" , r, flags, self . flags) ;
@@ -919,6 +924,7 @@ impl<'tcx> TypeVisitor<'tcx> for HasTypeFlagsVisitor {
919
924
}
920
925
}
921
926
927
+ #[ inline]
922
928
fn visit_const ( & mut self , c : & ' tcx ty:: Const < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
923
929
let flags = FlagComputation :: for_const ( c) ;
924
930
debug ! ( "HasTypeFlagsVisitor: c={:?} c.flags={:?} self.flags={:?}" , c, flags, self . flags) ;
@@ -929,6 +935,7 @@ impl<'tcx> TypeVisitor<'tcx> for HasTypeFlagsVisitor {
929
935
}
930
936
}
931
937
938
+ #[ inline]
932
939
fn visit_predicate ( & mut self , predicate : ty:: Predicate < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
933
940
debug ! (
934
941
"HasTypeFlagsVisitor: predicate={:?} predicate.flags={:?} self.flags={:?}" ,
0 commit comments