@@ -13,7 +13,7 @@ use rustc_type_ir::{self as ty, Interner};
1313use crate :: delegate:: SolverDelegate ;
1414use crate :: solve:: eval_ctxt:: canonical;
1515use crate :: solve:: {
16- CanonicalInput , Certainty , GenerateProofTree , Goal , GoalEvaluationKind , GoalSource , QueryInput ,
16+ CanonicalInput , Certainty , GenerateProofTree , Goal , GoalEvaluationKind , GoalSource ,
1717 QueryResult , inspect,
1818} ;
1919
@@ -119,6 +119,9 @@ impl<I: Interner> WipCanonicalGoalEvaluation<I> {
119119 }
120120}
121121
122+ /// This only exists during proof tree building and does not have
123+ /// a corresponding struct in `inspect`. We need this to track a
124+ /// bunch of metadata about the current evaluation.
122125#[ derive_where( PartialEq , Eq , Debug ; I : Interner ) ]
123126struct WipCanonicalGoalEvaluationStep < I : Interner > {
124127 /// Unlike `EvalCtxt::var_values`, we append a new
@@ -128,7 +131,6 @@ struct WipCanonicalGoalEvaluationStep<I: Interner> {
128131 /// This is necessary as we otherwise don't unify these
129132 /// vars when instantiating multiple `CanonicalState`.
130133 var_values : Vec < I :: GenericArg > ,
131- instantiated_goal : QueryInput < I , I :: Predicate > ,
132134 probe_depth : usize ,
133135 evaluation : WipProbe < I > ,
134136}
@@ -145,16 +147,12 @@ impl<I: Interner> WipCanonicalGoalEvaluationStep<I> {
145147 current
146148 }
147149
148- fn finalize ( self ) -> inspect:: CanonicalGoalEvaluationStep < I > {
150+ fn finalize ( self ) -> inspect:: Probe < I > {
149151 let evaluation = self . evaluation . finalize ( ) ;
150152 match evaluation. kind {
151- inspect:: ProbeKind :: Root { .. } => ( ) ,
153+ inspect:: ProbeKind :: Root { .. } => evaluation ,
152154 _ => unreachable ! ( "unexpected root evaluation: {evaluation:?}" ) ,
153155 }
154- inspect:: CanonicalGoalEvaluationStep {
155- instantiated_goal : self . instantiated_goal ,
156- evaluation,
157- }
158156 }
159157}
160158
@@ -328,11 +326,9 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
328326 pub ( crate ) fn new_goal_evaluation_step (
329327 & mut self ,
330328 var_values : ty:: CanonicalVarValues < I > ,
331- instantiated_goal : QueryInput < I , I :: Predicate > ,
332329 ) -> ProofTreeBuilder < D > {
333330 self . nested ( || WipCanonicalGoalEvaluationStep {
334331 var_values : var_values. var_values . to_vec ( ) ,
335- instantiated_goal,
336332 evaluation : WipProbe {
337333 initial_num_var_values : var_values. len ( ) ,
338334 steps : vec ! [ ] ,
0 commit comments