11use crate :: infer:: { InferCtxt , TyOrConstInferVar } ;
2- use rustc_data_structures:: fx:: FxHashMap ;
32use rustc_data_structures:: obligation_forest:: ProcessResult ;
43use rustc_data_structures:: obligation_forest:: { Error , ForestObligation , Outcome } ;
54use rustc_data_structures:: obligation_forest:: { ObligationForest , ObligationProcessor } ;
@@ -54,8 +53,6 @@ pub struct FulfillmentContext<'tcx> {
5453 // fulfillment context.
5554 predicates : ObligationForest < PendingPredicateObligation < ' tcx > > ,
5655
57- relationships : FxHashMap < ty:: TyVid , ty:: FoundRelationships > ,
58-
5956 // Is it OK to register obligations into this infcx inside
6057 // an infcx snapshot?
6158 //
@@ -85,19 +82,11 @@ static_assert_size!(PendingPredicateObligation<'_>, 72);
8582impl < ' a , ' tcx > FulfillmentContext < ' tcx > {
8683 /// Creates a new fulfillment context.
8784 pub ( super ) fn new ( ) -> FulfillmentContext < ' tcx > {
88- FulfillmentContext {
89- predicates : ObligationForest :: new ( ) ,
90- relationships : FxHashMap :: default ( ) ,
91- usable_in_snapshot : false ,
92- }
85+ FulfillmentContext { predicates : ObligationForest :: new ( ) , usable_in_snapshot : false }
9386 }
9487
9588 pub ( super ) fn new_in_snapshot ( ) -> FulfillmentContext < ' tcx > {
96- FulfillmentContext {
97- predicates : ObligationForest :: new ( ) ,
98- relationships : FxHashMap :: default ( ) ,
99- usable_in_snapshot : true ,
100- }
89+ FulfillmentContext { predicates : ObligationForest :: new ( ) , usable_in_snapshot : true }
10190 }
10291
10392 /// Attempts to select obligations using `selcx`.
@@ -139,8 +128,6 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
139128
140129 assert ! ( !infcx. is_in_snapshot( ) || self . usable_in_snapshot) ;
141130
142- super :: relationships:: update ( self , infcx, & obligation) ;
143-
144131 self . predicates
145132 . register_obligation ( PendingPredicateObligation { obligation, stalled_on : vec ! [ ] } ) ;
146133 }
@@ -164,10 +151,6 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
164151 fn pending_obligations ( & self ) -> Vec < PredicateObligation < ' tcx > > {
165152 self . predicates . map_pending_obligations ( |o| o. obligation . clone ( ) )
166153 }
167-
168- fn relationships ( & mut self ) -> & mut FxHashMap < ty:: TyVid , ty:: FoundRelationships > {
169- & mut self . relationships
170- }
171154}
172155
173156struct FulfillProcessor < ' a , ' tcx > {
0 commit comments