@@ -19,9 +19,8 @@ use rustc_middle::query::Providers;
1919use rustc_middle:: traits:: solve:: NoSolution ;
2020use rustc_middle:: ty:: trait_def:: TraitSpecializationKind ;
2121use rustc_middle:: ty:: {
22- self , AdtKind , GenericArgKind , GenericArgs , GenericParamDefKind , Ty , TyCtxt , TypeFlags ,
23- TypeFoldable , TypeSuperVisitable , TypeVisitable , TypeVisitableExt , TypeVisitor , TypingMode ,
24- Upcast ,
22+ self , AdtKind , GenericArgKind , GenericArgs , GenericParamDefKind , Ty , TyCtxt , TypeFoldable ,
23+ TypeSuperVisitable , TypeVisitable , TypeVisitableExt , TypeVisitor , TypingMode , Upcast ,
2524} ;
2625use rustc_middle:: { bug, span_bug} ;
2726use rustc_session:: parse:: feature_err;
@@ -2319,7 +2318,7 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
23192318 continue ;
23202319 }
23212320 // Match the existing behavior.
2322- if pred. is_global ( ) && !pred. has_type_flags ( TypeFlags :: HAS_BINDER_VARS ) {
2321+ if pred. is_global ( ) && !pred. kind ( ) . skip_binder ( ) . has_escaping_bound_vars ( ) {
23232322 let pred = self . normalize ( span, None , pred) ;
23242323
23252324 // only use the span of the predicate clause (#90869)
0 commit comments