@@ -199,7 +199,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
199
199
// code is so hot. 1 and 0 dominate; 2+ is fairly rare.
200
200
1 => {
201
201
let infer_var = pending_obligation. stalled_on [ 0 ] ;
202
- self . selcx . infcx ( ) . ty_or_const_infer_var_changed ( infer_var)
202
+ self . selcx . infcx . ty_or_const_infer_var_changed ( infer_var)
203
203
}
204
204
0 => {
205
205
// In this case we haven't changed, but wish to make a change.
@@ -210,7 +210,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
210
210
// form was a perf win. See #64545 for details.
211
211
( || {
212
212
for & infer_var in & pending_obligation. stalled_on {
213
- if self . selcx . infcx ( ) . ty_or_const_infer_var_changed ( infer_var) {
213
+ if self . selcx . infcx . ty_or_const_infer_var_changed ( infer_var) {
214
214
return true ;
215
215
}
216
216
}
@@ -240,13 +240,12 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
240
240
debug ! ( ?obligation, "pre-resolve" ) ;
241
241
242
242
if obligation. predicate . has_non_region_infer ( ) {
243
- obligation. predicate =
244
- self . selcx . infcx ( ) . resolve_vars_if_possible ( obligation. predicate ) ;
243
+ obligation. predicate = self . selcx . infcx . resolve_vars_if_possible ( obligation. predicate ) ;
245
244
}
246
245
247
246
let obligation = & pending_obligation. obligation ;
248
247
249
- let infcx = self . selcx . infcx ( ) ;
248
+ let infcx = self . selcx . infcx ;
250
249
251
250
if obligation. predicate . has_projections ( ) {
252
251
let mut obligations = Vec :: new ( ) ;
@@ -353,7 +352,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
353
352
}
354
353
355
354
ty:: PredicateKind :: ClosureKind ( _, closure_substs, kind) => {
356
- match self . selcx . infcx ( ) . closure_kind ( closure_substs) {
355
+ match self . selcx . infcx . closure_kind ( closure_substs) {
357
356
Some ( closure_kind) => {
358
357
if closure_kind. extends ( kind) {
359
358
ProcessResult :: Changed ( vec ! [ ] )
@@ -367,7 +366,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
367
366
368
367
ty:: PredicateKind :: WellFormed ( arg) => {
369
368
match wf:: obligations (
370
- self . selcx . infcx ( ) ,
369
+ self . selcx . infcx ,
371
370
obligation. param_env ,
372
371
obligation. cause . body_id ,
373
372
obligation. recursion_depth + 1 ,
@@ -384,7 +383,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
384
383
}
385
384
386
385
ty:: PredicateKind :: Subtype ( subtype) => {
387
- match self . selcx . infcx ( ) . subtype_predicate (
386
+ match self . selcx . infcx . subtype_predicate (
388
387
& obligation. cause ,
389
388
obligation. param_env ,
390
389
Binder :: dummy ( subtype) ,
@@ -408,7 +407,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
408
407
}
409
408
410
409
ty:: PredicateKind :: Coerce ( coerce) => {
411
- match self . selcx . infcx ( ) . coerce_predicate (
410
+ match self . selcx . infcx . coerce_predicate (
412
411
& obligation. cause ,
413
412
obligation. param_env ,
414
413
Binder :: dummy ( coerce) ,
@@ -432,7 +431,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
432
431
433
432
ty:: PredicateKind :: ConstEvaluatable ( uv) => {
434
433
match const_evaluatable:: is_const_evaluatable (
435
- self . selcx . infcx ( ) ,
434
+ self . selcx . infcx ,
436
435
uv,
437
436
obligation. param_env ,
438
437
obligation. cause . span ,
@@ -503,7 +502,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
503
502
504
503
let mut evaluate = |c : Const < ' tcx > | {
505
504
if let ty:: ConstKind :: Unevaluated ( unevaluated) = c. kind ( ) {
506
- match self . selcx . infcx ( ) . try_const_eval_resolve (
505
+ match self . selcx . infcx . try_const_eval_resolve (
507
506
obligation. param_env ,
508
507
unevaluated,
509
508
c. ty ( ) ,
@@ -531,7 +530,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
531
530
( Ok ( c1) , Ok ( c2) ) => {
532
531
match self
533
532
. selcx
534
- . infcx ( )
533
+ . infcx
535
534
. at ( & obligation. cause , obligation. param_env )
536
535
. eq ( c1, c2)
537
536
{
@@ -601,7 +600,7 @@ impl<'a, 'tcx> FulfillProcessor<'a, 'tcx> {
601
600
trait_obligation : TraitObligation < ' tcx > ,
602
601
stalled_on : & mut Vec < TyOrConstInferVar < ' tcx > > ,
603
602
) -> ProcessResult < PendingPredicateObligation < ' tcx > , FulfillmentErrorCode < ' tcx > > {
604
- let infcx = self . selcx . infcx ( ) ;
603
+ let infcx = self . selcx . infcx ;
605
604
if obligation. predicate . is_global ( ) {
606
605
// no type variables present, can use evaluation for better caching.
607
606
// FIXME: consider caching errors too.
@@ -659,7 +658,7 @@ impl<'a, 'tcx> FulfillProcessor<'a, 'tcx> {
659
658
if obligation. predicate . is_global ( ) {
660
659
// no type variables present, can use evaluation for better caching.
661
660
// FIXME: consider caching errors too.
662
- if self . selcx . infcx ( ) . predicate_must_hold_considering_regions ( obligation) {
661
+ if self . selcx . infcx . predicate_must_hold_considering_regions ( obligation) {
663
662
if let Some ( key) = ProjectionCacheKey :: from_poly_projection_predicate (
664
663
& mut self . selcx ,
665
664
project_obligation. predicate ,
@@ -668,7 +667,7 @@ impl<'a, 'tcx> FulfillProcessor<'a, 'tcx> {
668
667
// evaluated all sub-obligations. We can therefore mark the 'root'
669
668
// obligation as complete, and skip evaluating sub-obligations.
670
669
self . selcx
671
- . infcx ( )
670
+ . infcx
672
671
. inner
673
672
. borrow_mut ( )
674
673
. projection_cache ( )
@@ -707,7 +706,7 @@ fn substs_infer_vars<'a, 'tcx>(
707
706
substs : ty:: Binder < ' tcx , SubstsRef < ' tcx > > ,
708
707
) -> impl Iterator < Item = TyOrConstInferVar < ' tcx > > {
709
708
selcx
710
- . infcx ( )
709
+ . infcx
711
710
. resolve_vars_if_possible ( substs)
712
711
. skip_binder ( ) // ok because this check doesn't care about regions
713
712
. iter ( )
0 commit comments