11use rustc_data_structures:: fx:: FxHashMap ;
22use rustc_errors:: ErrorGuaranteed ;
3+ use rustc_infer:: infer:: relate:: { ObligationEmittingRelation , StructurallyRelateAliases } ;
4+ use rustc_infer:: infer:: relate:: { Relate , RelateResult , TypeRelation } ;
35use rustc_infer:: infer:: NllRegionVariableOrigin ;
4- use rustc_infer:: infer:: { ObligationEmittingRelation , StructurallyRelateAliases } ;
56use rustc_infer:: traits:: { Obligation , PredicateObligations } ;
67use rustc_middle:: mir:: ConstraintCategory ;
78use rustc_middle:: span_bug;
89use rustc_middle:: traits:: query:: NoSolution ;
910use rustc_middle:: traits:: ObligationCause ;
1011use rustc_middle:: ty:: fold:: FnMutDelegate ;
11- use rustc_middle:: ty:: relate:: { Relate , RelateResult , TypeRelation } ;
1212use rustc_middle:: ty:: { self , Ty , TyCtxt , TypeVisitableExt } ;
1313use rustc_span:: symbol:: sym;
1414use rustc_span:: { Span , Symbol } ;
@@ -82,7 +82,7 @@ pub struct NllTypeRelating<'me, 'bccx, 'tcx> {
8282 /// - Bivariant means that it doesn't matter.
8383 ambient_variance : ty:: Variance ,
8484
85- ambient_variance_info : ty:: VarianceDiagInfo < ' tcx > ,
85+ ambient_variance_info : ty:: VarianceDiagInfo < TyCtxt < ' tcx > > ,
8686}
8787
8888impl < ' me , ' bccx , ' tcx > NllTypeRelating < ' me , ' bccx , ' tcx > {
@@ -296,7 +296,7 @@ impl<'me, 'bccx, 'tcx> NllTypeRelating<'me, 'bccx, 'tcx> {
296296 & mut self ,
297297 sup : ty:: Region < ' tcx > ,
298298 sub : ty:: Region < ' tcx > ,
299- info : ty:: VarianceDiagInfo < ' tcx > ,
299+ info : ty:: VarianceDiagInfo < TyCtxt < ' tcx > > ,
300300 ) {
301301 let sub = self . type_checker . borrowck_context . universal_regions . to_region_vid ( sub) ;
302302 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> {
314314 }
315315}
316316
317- impl < ' bccx , ' tcx > TypeRelation < ' tcx > for NllTypeRelating < ' _ , ' bccx , ' tcx > {
317+ impl < ' bccx , ' tcx > TypeRelation < TyCtxt < ' tcx > > for NllTypeRelating < ' _ , ' bccx , ' tcx > {
318318 fn tcx ( & self ) -> TyCtxt < ' tcx > {
319319 self . type_checker . infcx . tcx
320320 }
@@ -324,10 +324,10 @@ impl<'bccx, 'tcx> TypeRelation<'tcx> for NllTypeRelating<'_, 'bccx, 'tcx> {
324324 }
325325
326326 #[ instrument( skip( self , info) , level = "trace" , ret) ]
327- fn relate_with_variance < T : Relate < ' tcx > > (
327+ fn relate_with_variance < T : Relate < TyCtxt < ' tcx > > > (
328328 & mut self ,
329329 variance : ty:: Variance ,
330- info : ty:: VarianceDiagInfo < ' tcx > ,
330+ info : ty:: VarianceDiagInfo < TyCtxt < ' tcx > > ,
331331 a : T ,
332332 b : T ,
333333 ) -> RelateResult < ' tcx , T > {
@@ -445,7 +445,7 @@ impl<'bccx, 'tcx> TypeRelation<'tcx> for NllTypeRelating<'_, 'bccx, 'tcx> {
445445 b : ty:: Binder < ' tcx , T > ,
446446 ) -> RelateResult < ' tcx , ty:: Binder < ' tcx , T > >
447447 where
448- T : Relate < ' tcx > ,
448+ T : Relate < TyCtxt < ' tcx > > ,
449449 {
450450 // We want that
451451 //
0 commit comments