@@ -13,7 +13,7 @@ use rustc_type_ir::{self as ty, Interner};
13
13
use crate :: delegate:: SolverDelegate ;
14
14
use crate :: solve:: eval_ctxt:: canonical;
15
15
use crate :: solve:: {
16
- CanonicalInput , Certainty , GenerateProofTree , Goal , GoalEvaluationKind , GoalSource , QueryInput ,
16
+ CanonicalInput , Certainty , GenerateProofTree , Goal , GoalEvaluationKind , GoalSource ,
17
17
QueryResult , inspect,
18
18
} ;
19
19
@@ -119,6 +119,9 @@ impl<I: Interner> WipCanonicalGoalEvaluation<I> {
119
119
}
120
120
}
121
121
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.
122
125
#[ derive_where( PartialEq , Eq , Debug ; I : Interner ) ]
123
126
struct WipCanonicalGoalEvaluationStep < I : Interner > {
124
127
/// Unlike `EvalCtxt::var_values`, we append a new
@@ -128,7 +131,6 @@ struct WipCanonicalGoalEvaluationStep<I: Interner> {
128
131
/// This is necessary as we otherwise don't unify these
129
132
/// vars when instantiating multiple `CanonicalState`.
130
133
var_values : Vec < I :: GenericArg > ,
131
- instantiated_goal : QueryInput < I , I :: Predicate > ,
132
134
probe_depth : usize ,
133
135
evaluation : WipProbe < I > ,
134
136
}
@@ -145,16 +147,12 @@ impl<I: Interner> WipCanonicalGoalEvaluationStep<I> {
145
147
current
146
148
}
147
149
148
- fn finalize ( self ) -> inspect:: CanonicalGoalEvaluationStep < I > {
150
+ fn finalize ( self ) -> inspect:: Probe < I > {
149
151
let evaluation = self . evaluation . finalize ( ) ;
150
152
match evaluation. kind {
151
- inspect:: ProbeKind :: Root { .. } => ( ) ,
153
+ inspect:: ProbeKind :: Root { .. } => evaluation ,
152
154
_ => unreachable ! ( "unexpected root evaluation: {evaluation:?}" ) ,
153
155
}
154
- inspect:: CanonicalGoalEvaluationStep {
155
- instantiated_goal : self . instantiated_goal ,
156
- evaluation,
157
- }
158
156
}
159
157
}
160
158
@@ -328,11 +326,9 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
328
326
pub ( crate ) fn new_goal_evaluation_step (
329
327
& mut self ,
330
328
var_values : ty:: CanonicalVarValues < I > ,
331
- instantiated_goal : QueryInput < I , I :: Predicate > ,
332
329
) -> ProofTreeBuilder < D > {
333
330
self . nested ( || WipCanonicalGoalEvaluationStep {
334
331
var_values : var_values. var_values . to_vec ( ) ,
335
- instantiated_goal,
336
332
evaluation : WipProbe {
337
333
initial_num_var_values : var_values. len ( ) ,
338
334
steps : vec ! [ ] ,
0 commit comments