@@ -372,7 +372,7 @@ impl<'tcx> Generalizer<'_, 'tcx> {
372
372
373
373
let is_nested_alias = mem:: replace ( & mut self . in_alias , true ) ;
374
374
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 ( ) ) ) ,
376
376
Err ( e) => {
377
377
if is_nested_alias {
378
378
return Err ( e) ;
@@ -397,7 +397,7 @@ impl<'tcx> Generalizer<'_, 'tcx> {
397
397
}
398
398
399
399
impl < ' tcx > TypeRelation < TyCtxt < ' tcx > > for Generalizer < ' _ , ' tcx > {
400
- fn tcx ( & self ) -> TyCtxt < ' tcx > {
400
+ fn cx ( & self ) -> TyCtxt < ' tcx > {
401
401
self . infcx . tcx
402
402
}
403
403
@@ -417,7 +417,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
417
417
// (e.g., #41849).
418
418
relate:: relate_args_invariantly ( self , a_arg, b_arg)
419
419
} else {
420
- let tcx = self . tcx ( ) ;
420
+ let tcx = self . cx ( ) ;
421
421
let opt_variances = tcx. variances_of ( item_def_id) ;
422
422
relate:: relate_args_with_variances (
423
423
self ,
@@ -525,7 +525,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
525
525
}
526
526
527
527
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) )
529
529
}
530
530
}
531
531
}
@@ -654,7 +654,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
654
654
{
655
655
variable_table. union ( vid, new_var_id) ;
656
656
}
657
- Ok ( ty:: Const :: new_var ( self . tcx ( ) , new_var_id) )
657
+ Ok ( ty:: Const :: new_var ( self . cx ( ) , new_var_id) )
658
658
}
659
659
}
660
660
}
@@ -672,7 +672,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for Generalizer<'_, 'tcx> {
672
672
args,
673
673
args,
674
674
) ?;
675
- Ok ( ty:: Const :: new_unevaluated ( self . tcx ( ) , ty:: UnevaluatedConst { def, args } ) )
675
+ Ok ( ty:: Const :: new_unevaluated ( self . cx ( ) , ty:: UnevaluatedConst { def, args } ) )
676
676
}
677
677
ty:: ConstKind :: Placeholder ( placeholder) => {
678
678
if self . for_universe . can_name ( placeholder. universe ) {
0 commit comments