@@ -32,7 +32,7 @@ pub(super) fn sub_types<'tcx>(
32
32
) -> Fallible < ( ) > {
33
33
debug ! ( "sub_types(a={:?}, b={:?}, locations={:?})" , a, b, locations) ;
34
34
TypeRelating :: new (
35
- infcx. tcx ,
35
+ infcx,
36
36
NllTypeRelatingDelegate :: new ( infcx, borrowck_context, locations, category) ,
37
37
ty:: Variance :: Covariant ,
38
38
ty:: List :: empty ( ) ,
@@ -51,7 +51,7 @@ pub(super) fn eq_types<'tcx>(
51
51
) -> Fallible < ( ) > {
52
52
debug ! ( "eq_types(a={:?}, b={:?}, locations={:?})" , a, b, locations) ;
53
53
TypeRelating :: new (
54
- infcx. tcx ,
54
+ infcx,
55
55
NllTypeRelatingDelegate :: new ( infcx, borrowck_context, locations, category) ,
56
56
ty:: Variance :: Invariant ,
57
57
ty:: List :: empty ( ) ,
@@ -86,7 +86,7 @@ pub(super) fn relate_type_and_user_type<'tcx>(
86
86
let v1 = ty:: Contravariant . xform ( v) ;
87
87
88
88
let mut type_relating = TypeRelating :: new (
89
- infcx. tcx ,
89
+ infcx,
90
90
NllTypeRelatingDelegate :: new ( infcx, borrowck_context, locations, category) ,
91
91
v1,
92
92
b_variables,
@@ -109,7 +109,7 @@ struct TypeRelating<'me, 'gcx: 'tcx, 'tcx: 'me, D>
109
109
where
110
110
D : TypeRelatingDelegate < ' tcx > ,
111
111
{
112
- tcx : TyCtxt < ' me , ' gcx , ' tcx > ,
112
+ infcx : & ' me InferCtxt < ' me , ' gcx , ' tcx > ,
113
113
114
114
/// Callback to use when we deduce an outlives relationship
115
115
delegate : D ,
@@ -276,14 +276,14 @@ where
276
276
D : TypeRelatingDelegate < ' tcx > ,
277
277
{
278
278
fn new (
279
- tcx : TyCtxt < ' me , ' gcx , ' tcx > ,
279
+ infcx : & ' me InferCtxt < ' me , ' gcx , ' tcx > ,
280
280
delegate : D ,
281
281
ambient_variance : ty:: Variance ,
282
282
canonical_var_infos : CanonicalVarInfos < ' tcx > ,
283
283
) -> Self {
284
284
let canonical_var_values = IndexVec :: from_elem_n ( None , canonical_var_infos. len ( ) ) ;
285
285
Self {
286
- tcx ,
286
+ infcx ,
287
287
delegate,
288
288
ambient_variance,
289
289
canonical_var_values,
@@ -432,7 +432,7 @@ where
432
432
433
433
fn generalize_value ( & mut self , kind : Kind < ' tcx > ) -> Kind < ' tcx > {
434
434
TypeGeneralizer {
435
- tcx : self . tcx ,
435
+ tcx : self . infcx . tcx ,
436
436
delegate : & mut self . delegate ,
437
437
first_free_index : ty:: INNERMOST ,
438
438
ambient_variance : self . ambient_variance ,
@@ -450,7 +450,7 @@ where
450
450
D : TypeRelatingDelegate < ' tcx > ,
451
451
{
452
452
fn tcx ( & self ) -> TyCtxt < ' me , ' gcx , ' tcx > {
453
- self . tcx
453
+ self . infcx . tcx
454
454
}
455
455
456
456
fn tag ( & self ) -> & ' static str {
0 commit comments