@@ -4,7 +4,7 @@ use rustc_hir::def::DefKind;
4
4
use rustc_index:: bit_set:: BitSet ;
5
5
use rustc_middle:: query:: Providers ;
6
6
use rustc_middle:: ty:: {
7
- self , EarlyBinder , ToPredicate , Ty , TyCtxt , TypeSuperVisitable , TypeVisitable , TypeVisitor ,
7
+ self , EarlyBinder , Ty , TyCtxt , TypeSuperVisitable , TypeVisitable , TypeVisitor ,
8
8
} ;
9
9
use rustc_span:: def_id:: { DefId , LocalDefId , CRATE_DEF_ID } ;
10
10
use rustc_span:: DUMMY_SP ;
@@ -220,13 +220,10 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ImplTraitInTraitFinder<'_, 'tcx> {
220
220
// strategy, then just reinterpret the associated type like an opaque :^)
221
221
let default_ty = self . tcx . type_of ( shifted_alias_ty. def_id ) . instantiate ( self . tcx , shifted_alias_ty. args ) ;
222
222
223
- self . predicates . push (
224
- ty:: Binder :: bind_with_vars (
225
- ty:: ProjectionPredicate { projection_ty : shifted_alias_ty, term : default_ty. into ( ) } ,
226
- self . bound_vars ,
227
- )
228
- . to_predicate ( self . tcx ) ,
229
- ) ;
223
+ self . predicates . push ( ty:: Clause :: from_projection_clause ( self . tcx , ty:: Binder :: bind_with_vars (
224
+ ty:: ProjectionPredicate { projection_ty : shifted_alias_ty, term : default_ty. into ( ) } ,
225
+ self . bound_vars ,
226
+ ) ) ) ;
230
227
231
228
// We walk the *un-shifted* alias ty, because we're tracking the de bruijn
232
229
// binder depth, and if we were to walk `shifted_alias_ty` instead, we'd
0 commit comments