1
1
use crate :: infer:: { InferCtxt , TyOrConstInferVar } ;
2
- use rustc_data_structures:: fx:: FxHashMap ;
3
2
use rustc_data_structures:: obligation_forest:: ProcessResult ;
4
3
use rustc_data_structures:: obligation_forest:: { Error , ForestObligation , Outcome } ;
5
4
use rustc_data_structures:: obligation_forest:: { ObligationForest , ObligationProcessor } ;
@@ -54,8 +53,6 @@ pub struct FulfillmentContext<'tcx> {
54
53
// fulfillment context.
55
54
predicates : ObligationForest < PendingPredicateObligation < ' tcx > > ,
56
55
57
- relationships : FxHashMap < ty:: TyVid , ty:: FoundRelationships > ,
58
-
59
56
// Is it OK to register obligations into this infcx inside
60
57
// an infcx snapshot?
61
58
//
@@ -85,19 +82,11 @@ static_assert_size!(PendingPredicateObligation<'_>, 72);
85
82
impl < ' a , ' tcx > FulfillmentContext < ' tcx > {
86
83
/// Creates a new fulfillment context.
87
84
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 }
93
86
}
94
87
95
88
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 }
101
90
}
102
91
103
92
/// Attempts to select obligations using `selcx`.
@@ -139,8 +128,6 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
139
128
140
129
assert ! ( !infcx. is_in_snapshot( ) || self . usable_in_snapshot) ;
141
130
142
- super :: relationships:: update ( self , infcx, & obligation) ;
143
-
144
131
self . predicates
145
132
. register_obligation ( PendingPredicateObligation { obligation, stalled_on : vec ! [ ] } ) ;
146
133
}
@@ -164,10 +151,6 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
164
151
fn pending_obligations ( & self ) -> Vec < PredicateObligation < ' tcx > > {
165
152
self . predicates . map_pending_obligations ( |o| o. obligation . clone ( ) )
166
153
}
167
-
168
- fn relationships ( & mut self ) -> & mut FxHashMap < ty:: TyVid , ty:: FoundRelationships > {
169
- & mut self . relationships
170
- }
171
154
}
172
155
173
156
struct FulfillProcessor < ' a , ' tcx > {
0 commit comments