1
1
use rustc_data_structures:: fx:: FxHashMap ;
2
2
use rustc_errors:: ErrorGuaranteed ;
3
+ use rustc_infer:: infer:: relate:: { ObligationEmittingRelation , StructurallyRelateAliases } ;
4
+ use rustc_infer:: infer:: relate:: { Relate , RelateResult , TypeRelation } ;
3
5
use rustc_infer:: infer:: NllRegionVariableOrigin ;
4
- use rustc_infer:: infer:: { ObligationEmittingRelation , StructurallyRelateAliases } ;
5
6
use rustc_infer:: traits:: { Obligation , PredicateObligations } ;
6
7
use rustc_middle:: mir:: ConstraintCategory ;
7
8
use rustc_middle:: span_bug;
8
9
use rustc_middle:: traits:: query:: NoSolution ;
9
10
use rustc_middle:: traits:: ObligationCause ;
10
11
use rustc_middle:: ty:: fold:: FnMutDelegate ;
11
- use rustc_middle:: ty:: relate:: { Relate , RelateResult , TypeRelation } ;
12
12
use rustc_middle:: ty:: { self , Ty , TyCtxt , TypeVisitableExt } ;
13
13
use rustc_span:: symbol:: sym;
14
14
use rustc_span:: { Span , Symbol } ;
@@ -82,7 +82,7 @@ pub struct NllTypeRelating<'me, 'bccx, 'tcx> {
82
82
/// - Bivariant means that it doesn't matter.
83
83
ambient_variance : ty:: Variance ,
84
84
85
- ambient_variance_info : ty:: VarianceDiagInfo < ' tcx > ,
85
+ ambient_variance_info : ty:: VarianceDiagInfo < TyCtxt < ' tcx > > ,
86
86
}
87
87
88
88
impl < ' me , ' bccx , ' tcx > NllTypeRelating < ' me , ' bccx , ' tcx > {
@@ -296,7 +296,7 @@ impl<'me, 'bccx, 'tcx> NllTypeRelating<'me, 'bccx, 'tcx> {
296
296
& mut self ,
297
297
sup : ty:: Region < ' tcx > ,
298
298
sub : ty:: Region < ' tcx > ,
299
- info : ty:: VarianceDiagInfo < ' tcx > ,
299
+ info : ty:: VarianceDiagInfo < TyCtxt < ' tcx > > ,
300
300
) {
301
301
let sub = self . type_checker . borrowck_context . universal_regions . to_region_vid ( sub) ;
302
302
let sup = self . type_checker . borrowck_context . universal_regions . to_region_vid ( sup) ;
@@ -314,7 +314,7 @@ impl<'me, 'bccx, 'tcx> NllTypeRelating<'me, 'bccx, 'tcx> {
314
314
}
315
315
}
316
316
317
- impl < ' bccx , ' tcx > TypeRelation < ' tcx > for NllTypeRelating < ' _ , ' bccx , ' tcx > {
317
+ impl < ' bccx , ' tcx > TypeRelation < TyCtxt < ' tcx > > for NllTypeRelating < ' _ , ' bccx , ' tcx > {
318
318
fn tcx ( & self ) -> TyCtxt < ' tcx > {
319
319
self . type_checker . infcx . tcx
320
320
}
@@ -324,10 +324,10 @@ impl<'bccx, 'tcx> TypeRelation<'tcx> for NllTypeRelating<'_, 'bccx, 'tcx> {
324
324
}
325
325
326
326
#[ instrument( skip( self , info) , level = "trace" , ret) ]
327
- fn relate_with_variance < T : Relate < ' tcx > > (
327
+ fn relate_with_variance < T : Relate < TyCtxt < ' tcx > > > (
328
328
& mut self ,
329
329
variance : ty:: Variance ,
330
- info : ty:: VarianceDiagInfo < ' tcx > ,
330
+ info : ty:: VarianceDiagInfo < TyCtxt < ' tcx > > ,
331
331
a : T ,
332
332
b : T ,
333
333
) -> RelateResult < ' tcx , T > {
@@ -445,7 +445,7 @@ impl<'bccx, 'tcx> TypeRelation<'tcx> for NllTypeRelating<'_, 'bccx, 'tcx> {
445
445
b : ty:: Binder < ' tcx , T > ,
446
446
) -> RelateResult < ' tcx , ty:: Binder < ' tcx , T > >
447
447
where
448
- T : Relate < ' tcx > ,
448
+ T : Relate < TyCtxt < ' tcx > > ,
449
449
{
450
450
// We want that
451
451
//
0 commit comments