@@ -56,7 +56,7 @@ pub(super) trait GoalKind<'tcx>:
56
56
/// Consider a clause, which consists of a "assumption" and some "requirements",
57
57
/// to satisfy a goal. If the requirements hold, then attempt to satisfy our
58
58
/// goal by equating it with the assumption.
59
- fn consider_implied_clause (
59
+ fn probe_and_consider_implied_clause (
60
60
ecx : & mut EvalCtxt < ' _ , ' tcx > ,
61
61
goal : Goal < ' tcx , Self > ,
62
62
assumption : ty:: Clause < ' tcx > ,
@@ -73,15 +73,15 @@ pub(super) trait GoalKind<'tcx>:
73
73
/// Consider a clause specifically for a `dyn Trait` self type. This requires
74
74
/// additionally checking all of the supertraits and object bounds to hold,
75
75
/// since they're not implied by the well-formedness of the object type.
76
- fn consider_object_bound_candidate (
76
+ fn probe_and_consider_object_bound_candidate (
77
77
ecx : & mut EvalCtxt < ' _ , ' tcx > ,
78
78
goal : Goal < ' tcx , Self > ,
79
79
assumption : ty:: Clause < ' tcx > ,
80
80
) -> QueryResult < ' tcx > {
81
81
Self :: probe_and_match_goal_against_assumption ( ecx, goal, assumption, |ecx| {
82
82
let tcx = ecx. tcx ( ) ;
83
83
let ty:: Dynamic ( bounds, _, _) = * goal. predicate . self_ty ( ) . kind ( ) else {
84
- bug ! ( "expected object type in `consider_object_bound_candidate `" ) ;
84
+ bug ! ( "expected object type in `probe_and_consider_object_bound_candidate `" ) ;
85
85
} ;
86
86
// FIXME(-Znext-solver=coinductive): Should this be `GoalSource::ImplWhereBound`?
87
87
ecx. add_goals (
@@ -557,7 +557,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
557
557
candidates : & mut Vec < Candidate < ' tcx > > ,
558
558
) {
559
559
for ( i, assumption) in goal. param_env . caller_bounds ( ) . iter ( ) . enumerate ( ) {
560
- match G :: consider_implied_clause ( self , goal, assumption, [ ] ) {
560
+ match G :: probe_and_consider_implied_clause ( self , goal, assumption, [ ] ) {
561
561
Ok ( result) => {
562
562
candidates. push ( Candidate { source : CandidateSource :: ParamEnv ( i) , result } )
563
563
}
@@ -648,7 +648,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
648
648
for assumption in
649
649
self . tcx ( ) . item_bounds ( alias_ty. def_id ) . instantiate ( self . tcx ( ) , alias_ty. args )
650
650
{
651
- match G :: consider_implied_clause ( self , goal, assumption, [ ] ) {
651
+ match G :: probe_and_consider_implied_clause ( self , goal, assumption, [ ] ) {
652
652
Ok ( result) => {
653
653
candidates. push ( Candidate { source : CandidateSource :: AliasBound , result } ) ;
654
654
}
@@ -728,7 +728,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
728
728
}
729
729
ty:: ExistentialPredicate :: Projection ( _)
730
730
| ty:: ExistentialPredicate :: AutoTrait ( _) => {
731
- match G :: consider_object_bound_candidate (
731
+ match G :: probe_and_consider_object_bound_candidate (
732
732
self ,
733
733
goal,
734
734
bound. with_self_ty ( tcx, self_ty) ,
@@ -749,7 +749,11 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
749
749
if let Some ( principal) = bounds. principal ( ) {
750
750
let principal_trait_ref = principal. with_self_ty ( tcx, self_ty) ;
751
751
self . walk_vtable ( principal_trait_ref, |ecx, assumption, vtable_base, _| {
752
- match G :: consider_object_bound_candidate ( ecx, goal, assumption. to_predicate ( tcx) ) {
752
+ match G :: probe_and_consider_object_bound_candidate (
753
+ ecx,
754
+ goal,
755
+ assumption. to_predicate ( tcx) ,
756
+ ) {
753
757
Ok ( result) => candidates. push ( Candidate {
754
758
source : CandidateSource :: BuiltinImpl ( BuiltinImplSource :: Object {
755
759
vtable_base,
0 commit comments