File tree 2 files changed +3
-2
lines changed
rustc_hir_analysis/src/check
rustc_trait_selection/src/traits/select
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2291,7 +2291,7 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
2291
2291
continue ;
2292
2292
}
2293
2293
// Match the existing behavior.
2294
- if pred. is_global ( ) && ! pred. has_type_flags ( TypeFlags :: HAS_BINDER_VARS ) {
2294
+ if pred. is_global ( ) && pred. kind ( ) . bound_vars ( ) . is_empty ( ) {
2295
2295
let pred = self . normalize ( span, None , pred) ;
2296
2296
2297
2297
// only use the span of the predicate clause (#90869)
Original file line number Diff line number Diff line change @@ -1862,7 +1862,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
1862
1862
//
1863
1863
// Our handling of where-bounds is generally fairly messy but necessary for backwards
1864
1864
// compatibility, see #50825 for why we need to handle global where-bounds like this.
1865
- let is_global = |c : ty:: PolyTraitPredicate < ' tcx > | c. is_global ( ) && !c. has_bound_vars ( ) ;
1865
+ let is_global =
1866
+ |c : ty:: PolyTraitPredicate < ' tcx > | c. is_global ( ) && c. bound_vars ( ) . is_empty ( ) ;
1866
1867
let param_candidates = candidates
1867
1868
. iter ( )
1868
1869
. filter_map ( |c| if let ParamCandidate ( p) = c. candidate { Some ( p) } else { None } ) ;
You can’t perform that action at this time.
0 commit comments