@@ -59,15 +59,15 @@ pub(super) trait GoalKind<'tcx>:
59
59
/// goal by equating it with the assumption.
60
60
fn probe_and_consider_implied_clause (
61
61
ecx : & mut EvalCtxt < ' _ , ' tcx > ,
62
- source : CandidateSource ,
62
+ parent_source : CandidateSource ,
63
63
goal : Goal < ' tcx , Self > ,
64
64
assumption : ty:: Clause < ' tcx > ,
65
- requirements : impl IntoIterator < Item = Goal < ' tcx , ty:: Predicate < ' tcx > > > ,
65
+ requirements : impl IntoIterator < Item = ( GoalSource , Goal < ' tcx , ty:: Predicate < ' tcx > > ) > ,
66
66
) -> Result < Candidate < ' tcx > , NoSolution > {
67
- Self :: probe_and_match_goal_against_assumption ( ecx, source , goal, assumption, |ecx| {
68
- // FIXME(-Znext-solver=coinductive): check whether this should be
69
- // `GoalSource::ImplWhereBound` for any caller.
70
- ecx . add_goals ( GoalSource :: Misc , requirements ) ;
67
+ Self :: probe_and_match_goal_against_assumption ( ecx, parent_source , goal, assumption, |ecx| {
68
+ for ( nested_source , goal ) in requirements {
69
+ ecx . add_goal ( nested_source , goal ) ;
70
+ }
71
71
ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
72
72
} )
73
73
}
@@ -86,9 +86,8 @@ pub(super) trait GoalKind<'tcx>:
86
86
let ty:: Dynamic ( bounds, _, _) = * goal. predicate . self_ty ( ) . kind ( ) else {
87
87
bug ! ( "expected object type in `probe_and_consider_object_bound_candidate`" ) ;
88
88
} ;
89
- // FIXME(-Znext-solver=coinductive): Should this be `GoalSource::ImplWhereBound`?
90
89
ecx. add_goals (
91
- GoalSource :: Misc ,
90
+ GoalSource :: ImplWhereBound ,
92
91
structural_traits:: predicates_for_object_candidate (
93
92
ecx,
94
93
goal. param_env ,
0 commit comments