@@ -222,15 +222,13 @@ fn do_normalize_predicates<'tcx>(
222
222
// them here too, and we will remove this function when
223
223
// we move over to lazy normalization *anyway*.
224
224
tcx. infer_ctxt ( ) . ignoring_regions ( ) . enter ( |infcx| {
225
- let fulfill_cx = FulfillmentContext :: new ( ) ;
226
- let predicates =
227
- match fully_normalize ( & infcx, fulfill_cx, cause, elaborated_env, predicates) {
228
- Ok ( predicates) => predicates,
229
- Err ( errors) => {
230
- let reported = infcx. report_fulfillment_errors ( & errors, None , false ) ;
231
- return Err ( reported) ;
232
- }
233
- } ;
225
+ let predicates = match fully_normalize ( & infcx, cause, elaborated_env, predicates) {
226
+ Ok ( predicates) => predicates,
227
+ Err ( errors) => {
228
+ let reported = infcx. report_fulfillment_errors ( & errors, None , false ) ;
229
+ return Err ( reported) ;
230
+ }
231
+ } ;
234
232
235
233
debug ! ( "do_normalize_predictes: normalized predicates = {:?}" , predicates) ;
236
234
@@ -383,7 +381,6 @@ pub fn normalize_param_env_or_error<'tcx>(
383
381
384
382
pub fn fully_normalize < ' a , ' tcx , T > (
385
383
infcx : & InferCtxt < ' a , ' tcx > ,
386
- mut fulfill_cx : FulfillmentContext < ' tcx > ,
387
384
cause : ObligationCause < ' tcx > ,
388
385
param_env : ty:: ParamEnv < ' tcx > ,
389
386
value : T ,
@@ -399,8 +396,10 @@ where
399
396
"fully_normalize: normalized_value={:?} obligations={:?}" ,
400
397
normalized_value, obligations
401
398
) ;
399
+
400
+ let mut fulfill_cx = FulfillmentContext :: new ( ) ;
402
401
for obligation in obligations {
403
- fulfill_cx. register_predicate_obligation ( selcx . infcx ( ) , obligation) ;
402
+ fulfill_cx. register_predicate_obligation ( infcx, obligation) ;
404
403
}
405
404
406
405
debug ! ( "fully_normalize: select_all_or_error start" ) ;
0 commit comments