@@ -18,7 +18,7 @@ pub use normalize::{
1818 deeply_normalize, deeply_normalize_with_skipped_universes,
1919 deeply_normalize_with_skipped_universes_and_ambiguous_coroutine_goals,
2020} ;
21- use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
21+ use rustc_middle:: ty:: { self , TyCtxt } ;
2222use rustc_middle:: util:: Providers ;
2323use rustc_span:: Span ;
2424pub use select:: InferCtxtSelectExt ;
@@ -40,15 +40,15 @@ fn try_eagerly_normalize_alias<'a, 'tcx>(
4040 type_erased_infcx : TypeErasedInfcx < ' a , ' tcx > ,
4141 param_env : ty:: ParamEnv < ' tcx > ,
4242 span : Span ,
43- alias : ty:: AliasTy < ' tcx > ,
44- ) -> Ty < ' tcx > {
43+ alias : ty:: AliasTerm < ' tcx > ,
44+ ) -> ty :: Term < ' tcx > {
4545 let infcx = unsafe {
4646 mem:: transmute :: < TypeErasedInfcx < ' a , ' tcx > , & ' a InferCtxt < ' tcx > > ( type_erased_infcx)
4747 } ;
4848
4949 let ocx = ObligationCtxt :: new ( infcx) ;
5050
51- let infer_term = infcx. next_ty_var ( span) ;
51+ let infer_term = infcx. next_term_var_of_alias_kind ( alias , span) ;
5252
5353 // Dummy because we ignore the error anyway.
5454 // We do provide a span, because this span is used when registering opaque types.
@@ -59,8 +59,8 @@ fn try_eagerly_normalize_alias<'a, 'tcx>(
5959 cause,
6060 param_env,
6161 ty:: PredicateKind :: AliasRelate (
62- alias. to_ty ( tcx) . into ( ) ,
63- infer_term. into ( ) ,
62+ alias. to_term ( tcx) ,
63+ infer_term,
6464 ty:: AliasRelationDirection :: Equate ,
6565 ) ,
6666 ) ;
0 commit comments