@@ -87,7 +87,7 @@ impl<'tcx> WipAddedGoalsEvaluation<'tcx> {
87
87
pub struct WipGoalEvaluationStep < ' tcx > {
88
88
pub instantiated_goal : QueryInput < ' tcx , ty:: Predicate < ' tcx > > ,
89
89
90
- pub evaluation : WipGoalCandidate < ' tcx > ,
90
+ pub evaluation : WipProbe < ' tcx > ,
91
91
}
92
92
93
93
impl < ' tcx > WipGoalEvaluationStep < ' tcx > {
@@ -102,21 +102,21 @@ impl<'tcx> WipGoalEvaluationStep<'tcx> {
102
102
}
103
103
104
104
#[ derive( Eq , PartialEq , Debug ) ]
105
- pub struct WipGoalCandidate < ' tcx > {
105
+ pub struct WipProbe < ' tcx > {
106
106
pub added_goals_evaluations : Vec < WipAddedGoalsEvaluation < ' tcx > > ,
107
- pub candidates : Vec < WipGoalCandidate < ' tcx > > ,
107
+ pub nested_probes : Vec < WipProbe < ' tcx > > ,
108
108
pub kind : Option < ProbeKind < ' tcx > > ,
109
109
}
110
110
111
- impl < ' tcx > WipGoalCandidate < ' tcx > {
112
- pub fn finalize ( self ) -> inspect:: GoalCandidate < ' tcx > {
113
- inspect:: GoalCandidate {
111
+ impl < ' tcx > WipProbe < ' tcx > {
112
+ pub fn finalize ( self ) -> inspect:: Probe < ' tcx > {
113
+ inspect:: Probe {
114
114
added_goals_evaluations : self
115
115
. added_goals_evaluations
116
116
. into_iter ( )
117
117
. map ( WipAddedGoalsEvaluation :: finalize)
118
118
. collect ( ) ,
119
- candidates : self . candidates . into_iter ( ) . map ( WipGoalCandidate :: finalize) . collect ( ) ,
119
+ nested_probes : self . nested_probes . into_iter ( ) . map ( WipProbe :: finalize) . collect ( ) ,
120
120
kind : self . kind . unwrap ( ) ,
121
121
}
122
122
}
@@ -129,7 +129,7 @@ pub enum DebugSolver<'tcx> {
129
129
CanonicalGoalEvaluation ( WipCanonicalGoalEvaluation < ' tcx > ) ,
130
130
AddedGoalsEvaluation ( WipAddedGoalsEvaluation < ' tcx > ) ,
131
131
GoalEvaluationStep ( WipGoalEvaluationStep < ' tcx > ) ,
132
- GoalCandidate ( WipGoalCandidate < ' tcx > ) ,
132
+ Probe ( WipProbe < ' tcx > ) ,
133
133
}
134
134
135
135
impl < ' tcx > From < WipGoalEvaluation < ' tcx > > for DebugSolver < ' tcx > {
@@ -156,9 +156,9 @@ impl<'tcx> From<WipGoalEvaluationStep<'tcx>> for DebugSolver<'tcx> {
156
156
}
157
157
}
158
158
159
- impl < ' tcx > From < WipGoalCandidate < ' tcx > > for DebugSolver < ' tcx > {
160
- fn from ( g : WipGoalCandidate < ' tcx > ) -> DebugSolver < ' tcx > {
161
- DebugSolver :: GoalCandidate ( g )
159
+ impl < ' tcx > From < WipProbe < ' tcx > > for DebugSolver < ' tcx > {
160
+ fn from ( p : WipProbe < ' tcx > ) -> DebugSolver < ' tcx > {
161
+ DebugSolver :: Probe ( p )
162
162
}
163
163
}
164
164
@@ -329,9 +329,9 @@ impl<'tcx> ProofTreeBuilder<'tcx> {
329
329
) -> ProofTreeBuilder < ' tcx > {
330
330
self . nested ( || WipGoalEvaluationStep {
331
331
instantiated_goal,
332
- evaluation : WipGoalCandidate {
332
+ evaluation : WipProbe {
333
333
added_goals_evaluations : vec ! [ ] ,
334
- candidates : vec ! [ ] ,
334
+ nested_probes : vec ! [ ] ,
335
335
kind : None ,
336
336
} ,
337
337
} )
@@ -350,36 +350,36 @@ impl<'tcx> ProofTreeBuilder<'tcx> {
350
350
}
351
351
}
352
352
353
- pub fn new_goal_candidate ( & mut self ) -> ProofTreeBuilder < ' tcx > {
354
- self . nested ( || WipGoalCandidate {
353
+ pub fn new_probe ( & mut self ) -> ProofTreeBuilder < ' tcx > {
354
+ self . nested ( || WipProbe {
355
355
added_goals_evaluations : vec ! [ ] ,
356
- candidates : vec ! [ ] ,
356
+ nested_probes : vec ! [ ] ,
357
357
kind : None ,
358
358
} )
359
359
}
360
360
361
361
pub fn probe_kind ( & mut self , probe_kind : ProbeKind < ' tcx > ) {
362
362
if let Some ( this) = self . as_mut ( ) {
363
363
match this {
364
- DebugSolver :: GoalCandidate ( this) => {
364
+ DebugSolver :: Probe ( this) => {
365
365
assert_eq ! ( this. kind. replace( probe_kind) , None )
366
366
}
367
367
_ => unreachable ! ( ) ,
368
368
}
369
369
}
370
370
}
371
371
372
- pub fn goal_candidate ( & mut self , candidate : ProofTreeBuilder < ' tcx > ) {
372
+ pub fn finish_probe ( & mut self , probe : ProofTreeBuilder < ' tcx > ) {
373
373
if let Some ( this) = self . as_mut ( ) {
374
- match ( this, candidate . state . unwrap ( ) . tree ) {
374
+ match ( this, probe . state . unwrap ( ) . tree ) {
375
375
(
376
- DebugSolver :: GoalCandidate ( WipGoalCandidate { candidates , .. } )
376
+ DebugSolver :: Probe ( WipProbe { nested_probes , .. } )
377
377
| DebugSolver :: GoalEvaluationStep ( WipGoalEvaluationStep {
378
- evaluation : WipGoalCandidate { candidates , .. } ,
378
+ evaluation : WipProbe { nested_probes , .. } ,
379
379
..
380
380
} ) ,
381
- DebugSolver :: GoalCandidate ( candidate ) ,
382
- ) => candidates . push ( candidate ) ,
381
+ DebugSolver :: Probe ( probe ) ,
382
+ ) => nested_probes . push ( probe ) ,
383
383
_ => unreachable ! ( ) ,
384
384
}
385
385
}
@@ -416,12 +416,10 @@ impl<'tcx> ProofTreeBuilder<'tcx> {
416
416
match ( this, added_goals_evaluation. state . unwrap ( ) . tree ) {
417
417
(
418
418
DebugSolver :: GoalEvaluationStep ( WipGoalEvaluationStep {
419
- evaluation : WipGoalCandidate { added_goals_evaluations, .. } ,
419
+ evaluation : WipProbe { added_goals_evaluations, .. } ,
420
420
..
421
421
} )
422
- | DebugSolver :: GoalCandidate ( WipGoalCandidate {
423
- added_goals_evaluations, ..
424
- } ) ,
422
+ | DebugSolver :: Probe ( WipProbe { added_goals_evaluations, .. } ) ,
425
423
DebugSolver :: AddedGoalsEvaluation ( added_goals_evaluation) ,
426
424
) => added_goals_evaluations. push ( added_goals_evaluation) ,
427
425
_ => unreachable ! ( ) ,
0 commit comments