@@ -83,7 +83,7 @@ pub(super) trait GoalKind<'tcx>:
83
83
assumption : ty:: Clause < ' tcx > ,
84
84
) -> Result < Candidate < ' tcx > , NoSolution > {
85
85
Self :: probe_and_match_goal_against_assumption ( ecx, source, goal, assumption, |ecx| {
86
- let tcx = ecx. tcx ( ) ;
86
+ let tcx = ecx. interner ( ) ;
87
87
let ty:: Dynamic ( bounds, _, _) = * goal. predicate . self_ty ( ) . kind ( ) else {
88
88
bug ! ( "expected object type in `probe_and_consider_object_bound_candidate`" ) ;
89
89
} ;
@@ -288,8 +288,10 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
288
288
return self . forced_ambiguity ( MaybeCause :: Ambiguity ) . into_iter ( ) . collect ( ) ;
289
289
}
290
290
291
- let goal: Goal < ' tcx , G > =
292
- goal. with ( self . tcx ( ) , goal. predicate . with_self_ty ( self . tcx ( ) , normalized_self_ty) ) ;
291
+ let goal: Goal < ' tcx , G > = goal. with (
292
+ self . interner ( ) ,
293
+ goal. predicate . with_self_ty ( self . interner ( ) , normalized_self_ty) ,
294
+ ) ;
293
295
// Vars that show up in the rest of the goal substs may have been constrained by
294
296
// normalizing the self type as well, since type variables are not uniquified.
295
297
let goal = self . resolve_vars_if_possible ( goal) ;
@@ -339,7 +341,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
339
341
goal : Goal < ' tcx , G > ,
340
342
candidates : & mut Vec < Candidate < ' tcx > > ,
341
343
) {
342
- let tcx = self . tcx ( ) ;
344
+ let tcx = self . interner ( ) ;
343
345
let self_ty = goal. predicate . self_ty ( ) ;
344
346
let trait_impls = tcx. trait_impls_of ( goal. predicate . trait_def_id ( tcx) ) ;
345
347
let mut consider_impls_for_simplified_type = |simp| {
@@ -455,7 +457,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
455
457
goal : Goal < ' tcx , G > ,
456
458
candidates : & mut Vec < Candidate < ' tcx > > ,
457
459
) {
458
- let tcx = self . tcx ( ) ;
460
+ let tcx = self . interner ( ) ;
459
461
let trait_impls = tcx. trait_impls_of ( goal. predicate . trait_def_id ( tcx) ) ;
460
462
for & impl_def_id in trait_impls. blanket_impls ( ) {
461
463
// For every `default impl`, there's always a non-default `impl`
@@ -478,7 +480,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
478
480
goal : Goal < ' tcx , G > ,
479
481
candidates : & mut Vec < Candidate < ' tcx > > ,
480
482
) {
481
- let tcx = self . tcx ( ) ;
483
+ let tcx = self . interner ( ) ;
482
484
let lang_items = tcx. lang_items ( ) ;
483
485
let trait_def_id = goal. predicate . trait_def_id ( tcx) ;
484
486
@@ -505,9 +507,9 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
505
507
G :: consider_builtin_pointer_like_candidate ( self , goal)
506
508
} else if lang_items. fn_ptr_trait ( ) == Some ( trait_def_id) {
507
509
G :: consider_builtin_fn_ptr_trait_candidate ( self , goal)
508
- } else if let Some ( kind) = self . tcx ( ) . fn_trait_kind_from_def_id ( trait_def_id) {
510
+ } else if let Some ( kind) = self . interner ( ) . fn_trait_kind_from_def_id ( trait_def_id) {
509
511
G :: consider_builtin_fn_trait_candidates ( self , goal, kind)
510
- } else if let Some ( kind) = self . tcx ( ) . async_fn_trait_kind_from_def_id ( trait_def_id) {
512
+ } else if let Some ( kind) = self . interner ( ) . async_fn_trait_kind_from_def_id ( trait_def_id) {
511
513
G :: consider_builtin_async_fn_trait_candidates ( self , goal, kind)
512
514
} else if lang_items. async_fn_kind_helper ( ) == Some ( trait_def_id) {
513
515
G :: consider_builtin_async_fn_kind_helper_candidate ( self , goal)
@@ -634,7 +636,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
634
636
635
637
ty:: Alias ( kind @ ( ty:: Projection | ty:: Opaque ) , alias_ty) => ( kind, alias_ty) ,
636
638
ty:: Alias ( ty:: Inherent | ty:: Weak , _) => {
637
- self . tcx ( ) . sess . dcx ( ) . span_delayed_bug (
639
+ self . interner ( ) . sess . dcx ( ) . span_delayed_bug (
638
640
DUMMY_SP ,
639
641
format ! ( "could not normalize {self_ty}, it is not WF" ) ,
640
642
) ;
@@ -643,7 +645,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
643
645
} ;
644
646
645
647
for assumption in
646
- self . tcx ( ) . item_bounds ( alias_ty. def_id ) . instantiate ( self . tcx ( ) , alias_ty. args )
648
+ self . interner ( ) . item_bounds ( alias_ty. def_id ) . instantiate ( self . interner ( ) , alias_ty. args )
647
649
{
648
650
candidates. extend ( G :: probe_and_consider_implied_clause (
649
651
self ,
@@ -673,7 +675,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
673
675
goal : Goal < ' tcx , G > ,
674
676
candidates : & mut Vec < Candidate < ' tcx > > ,
675
677
) {
676
- let tcx = self . tcx ( ) ;
678
+ let tcx = self . interner ( ) ;
677
679
if !tcx. trait_def ( goal. predicate . trait_def_id ( tcx) ) . implement_via_object {
678
680
return ;
679
681
}
@@ -764,7 +766,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
764
766
goal : Goal < ' tcx , G > ,
765
767
candidates : & mut Vec < Candidate < ' tcx > > ,
766
768
) {
767
- let tcx = self . tcx ( ) ;
769
+ let tcx = self . interner ( ) ;
768
770
769
771
candidates. extend ( self . probe_trait_candidate ( CandidateSource :: CoherenceUnknowable ) . enter (
770
772
|ecx| {
@@ -793,7 +795,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
793
795
goal : Goal < ' tcx , G > ,
794
796
candidates : & mut Vec < Candidate < ' tcx > > ,
795
797
) {
796
- let tcx = self . tcx ( ) ;
798
+ let tcx = self . interner ( ) ;
797
799
let trait_goal: Goal < ' tcx , ty:: TraitPredicate < ' tcx > > =
798
800
goal. with ( tcx, goal. predicate . trait_ref ( tcx) ) ;
799
801
0 commit comments