@@ -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 ,
@@ -476,7 +475,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
476
475
477
476
let mut evaluate = |c : Const < ' tcx > | {
478
477
if let ty:: ConstKind :: Unevaluated ( unevaluated) = c. kind ( ) {
479
- match self . selcx . infcx ( ) . try_const_eval_resolve (
478
+ match self . selcx . infcx . try_const_eval_resolve (
480
479
obligation. param_env ,
481
480
unevaluated,
482
481
c. ty ( ) ,
@@ -504,7 +503,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
504
503
( Ok ( c1) , Ok ( c2) ) => {
505
504
match self
506
505
. selcx
507
- . infcx ( )
506
+ . infcx
508
507
. at ( & obligation. cause , obligation. param_env )
509
508
. eq ( c1, c2)
510
509
{
@@ -572,7 +571,7 @@ impl<'a, 'tcx> FulfillProcessor<'a, 'tcx> {
572
571
trait_obligation : TraitObligation < ' tcx > ,
573
572
stalled_on : & mut Vec < TyOrConstInferVar < ' tcx > > ,
574
573
) -> ProcessResult < PendingPredicateObligation < ' tcx > , FulfillmentErrorCode < ' tcx > > {
575
- let infcx = self . selcx . infcx ( ) ;
574
+ let infcx = self . selcx . infcx ;
576
575
if obligation. predicate . is_global ( ) {
577
576
// no type variables present, can use evaluation for better caching.
578
577
// FIXME: consider caching errors too.
@@ -630,7 +629,7 @@ impl<'a, 'tcx> FulfillProcessor<'a, 'tcx> {
630
629
if obligation. predicate . is_global ( ) {
631
630
// no type variables present, can use evaluation for better caching.
632
631
// FIXME: consider caching errors too.
633
- if self . selcx . infcx ( ) . predicate_must_hold_considering_regions ( obligation) {
632
+ if self . selcx . infcx . predicate_must_hold_considering_regions ( obligation) {
634
633
if let Some ( key) = ProjectionCacheKey :: from_poly_projection_predicate (
635
634
& mut self . selcx ,
636
635
project_obligation. predicate ,
@@ -639,7 +638,7 @@ impl<'a, 'tcx> FulfillProcessor<'a, 'tcx> {
639
638
// evaluated all sub-obligations. We can therefore mark the 'root'
640
639
// obligation as complete, and skip evaluating sub-obligations.
641
640
self . selcx
642
- . infcx ( )
641
+ . infcx
643
642
. inner
644
643
. borrow_mut ( )
645
644
. projection_cache ( )
@@ -678,7 +677,7 @@ fn substs_infer_vars<'a, 'tcx>(
678
677
substs : ty:: Binder < ' tcx , SubstsRef < ' tcx > > ,
679
678
) -> impl Iterator < Item = TyOrConstInferVar < ' tcx > > {
680
679
selcx
681
- . infcx ( )
680
+ . infcx
682
681
. resolve_vars_if_possible ( substs)
683
682
. skip_binder ( ) // ok because this check doesn't care about regions
684
683
. iter ( )
0 commit comments