@@ -372,7 +372,7 @@ impl<'tcx> Generalizer<'_, 'tcx> {
372372
373373        let  is_nested_alias = mem:: replace ( & mut  self . in_alias ,  true ) ; 
374374        let  result = match  self . relate ( alias,  alias)  { 
375-             Ok ( alias)  => Ok ( alias. to_ty ( self . tcx ( ) ) ) , 
375+             Ok ( alias)  => Ok ( alias. to_ty ( self . cx ( ) ) ) , 
376376            Err ( e)  => { 
377377                if  is_nested_alias { 
378378                    return  Err ( e) ; 
@@ -397,7 +397,7 @@ impl<'tcx> Generalizer<'_, 'tcx> {
397397} 
398398
399399impl < ' tcx >  TypeRelation < TyCtxt < ' tcx > >  for  Generalizer < ' _ ,  ' tcx >  { 
400-     fn  tcx ( & self )  -> TyCtxt < ' tcx >  { 
400+     fn  cx ( & self )  -> TyCtxt < ' tcx >  { 
401401        self . infcx . tcx 
402402    } 
403403
@@ -417,7 +417,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
417417            // (e.g., #41849). 
418418            relate:: relate_args_invariantly ( self ,  a_arg,  b_arg) 
419419        }  else  { 
420-             let  tcx = self . tcx ( ) ; 
420+             let  tcx = self . cx ( ) ; 
421421            let  opt_variances = tcx. variances_of ( item_def_id) ; 
422422            relate:: relate_args_with_variances ( 
423423                self , 
@@ -525,7 +525,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
525525                            } 
526526
527527                            debug ! ( "replacing original vid={:?} with new={:?}" ,  vid,  new_var_id) ; 
528-                             Ok ( Ty :: new_var ( self . tcx ( ) ,  new_var_id) ) 
528+                             Ok ( Ty :: new_var ( self . cx ( ) ,  new_var_id) ) 
529529                        } 
530530                    } 
531531                } 
@@ -654,7 +654,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
654654                            { 
655655                                variable_table. union ( vid,  new_var_id) ; 
656656                            } 
657-                             Ok ( ty:: Const :: new_var ( self . tcx ( ) ,  new_var_id) ) 
657+                             Ok ( ty:: Const :: new_var ( self . cx ( ) ,  new_var_id) ) 
658658                        } 
659659                    } 
660660                } 
@@ -672,7 +672,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
672672                    args, 
673673                    args, 
674674                ) ?; 
675-                 Ok ( ty:: Const :: new_unevaluated ( self . tcx ( ) ,  ty:: UnevaluatedConst  {  def,  args } ) ) 
675+                 Ok ( ty:: Const :: new_unevaluated ( self . cx ( ) ,  ty:: UnevaluatedConst  {  def,  args } ) ) 
676676            } 
677677            ty:: ConstKind :: Placeholder ( placeholder)  => { 
678678                if  self . for_universe . can_name ( placeholder. universe )  { 
0 commit comments