@@ -19,9 +19,8 @@ use rustc_middle::query::Providers;
19
19
use rustc_middle:: traits:: solve:: NoSolution ;
20
20
use rustc_middle:: ty:: trait_def:: TraitSpecializationKind ;
21
21
use 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 ,
25
24
} ;
26
25
use rustc_middle:: { bug, span_bug} ;
27
26
use rustc_session:: parse:: feature_err;
@@ -2291,7 +2290,7 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
2291
2290
continue ;
2292
2291
}
2293
2292
// Match the existing behavior.
2294
- if pred. is_global ( ) && ! pred. has_type_flags ( TypeFlags :: HAS_BINDER_VARS ) {
2293
+ if pred. is_global ( ) && pred. kind ( ) . bound_vars ( ) . is_empty ( ) {
2295
2294
let pred = self . normalize ( span, None , pred) ;
2296
2295
2297
2296
// only use the span of the predicate clause (#90869)
0 commit comments