@@ -222,13 +222,13 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
222
222
self . state . as_deref_mut ( )
223
223
}
224
224
225
- pub fn take_and_enter_probe ( & mut self ) -> ProofTreeBuilder < D > {
225
+ pub ( crate ) fn take_and_enter_probe ( & mut self ) -> ProofTreeBuilder < D > {
226
226
let mut nested = ProofTreeBuilder { state : self . state . take ( ) , _infcx : PhantomData } ;
227
227
nested. enter_probe ( ) ;
228
228
nested
229
229
}
230
230
231
- pub fn finalize ( self ) -> Option < inspect:: GoalEvaluation < I > > {
231
+ pub ( crate ) fn finalize ( self ) -> Option < inspect:: GoalEvaluation < I > > {
232
232
match * self . state ? {
233
233
DebugSolver :: GoalEvaluation ( wip_goal_evaluation) => {
234
234
Some ( wip_goal_evaluation. finalize ( ) )
@@ -237,22 +237,22 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
237
237
}
238
238
}
239
239
240
- pub fn new_maybe_root ( generate_proof_tree : GenerateProofTree ) -> ProofTreeBuilder < D > {
240
+ pub ( crate ) fn new_maybe_root ( generate_proof_tree : GenerateProofTree ) -> ProofTreeBuilder < D > {
241
241
match generate_proof_tree {
242
242
GenerateProofTree :: No => ProofTreeBuilder :: new_noop ( ) ,
243
243
GenerateProofTree :: Yes => ProofTreeBuilder :: new_root ( ) ,
244
244
}
245
245
}
246
246
247
- pub fn new_root ( ) -> ProofTreeBuilder < D > {
247
+ fn new_root ( ) -> ProofTreeBuilder < D > {
248
248
ProofTreeBuilder :: new ( DebugSolver :: Root )
249
249
}
250
250
251
- pub fn new_noop ( ) -> ProofTreeBuilder < D > {
251
+ fn new_noop ( ) -> ProofTreeBuilder < D > {
252
252
ProofTreeBuilder { state : None , _infcx : PhantomData }
253
253
}
254
254
255
- pub fn is_noop ( & self ) -> bool {
255
+ pub ( crate ) fn is_noop ( & self ) -> bool {
256
256
self . state . is_none ( )
257
257
}
258
258
@@ -272,7 +272,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
272
272
} )
273
273
}
274
274
275
- pub fn new_canonical_goal_evaluation (
275
+ pub ( crate ) fn new_canonical_goal_evaluation (
276
276
& mut self ,
277
277
goal : CanonicalInput < I > ,
278
278
) -> ProofTreeBuilder < D > {
@@ -284,7 +284,10 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
284
284
} )
285
285
}
286
286
287
- pub fn canonical_goal_evaluation ( & mut self , canonical_goal_evaluation : ProofTreeBuilder < D > ) {
287
+ pub ( crate ) fn canonical_goal_evaluation (
288
+ & mut self ,
289
+ canonical_goal_evaluation : ProofTreeBuilder < D > ,
290
+ ) {
288
291
if let Some ( this) = self . as_mut ( ) {
289
292
match ( this, * canonical_goal_evaluation. state . unwrap ( ) ) {
290
293
(
@@ -299,7 +302,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
299
302
}
300
303
}
301
304
302
- pub fn canonical_goal_evaluation_overflow ( & mut self ) {
305
+ pub ( crate ) fn canonical_goal_evaluation_overflow ( & mut self ) {
303
306
if let Some ( this) = self . as_mut ( ) {
304
307
match this {
305
308
DebugSolver :: CanonicalGoalEvaluation ( canonical_goal_evaluation) => {
@@ -310,7 +313,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
310
313
}
311
314
}
312
315
313
- pub fn goal_evaluation ( & mut self , goal_evaluation : ProofTreeBuilder < D > ) {
316
+ pub ( crate ) fn goal_evaluation ( & mut self , goal_evaluation : ProofTreeBuilder < D > ) {
314
317
if let Some ( this) = self . as_mut ( ) {
315
318
match this {
316
319
DebugSolver :: Root => * this = * goal_evaluation. state . unwrap ( ) ,
@@ -322,7 +325,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
322
325
}
323
326
}
324
327
325
- pub fn new_goal_evaluation_step (
328
+ pub ( crate ) fn new_goal_evaluation_step (
326
329
& mut self ,
327
330
var_values : ty:: CanonicalVarValues < I > ,
328
331
instantiated_goal : QueryInput < I , I :: Predicate > ,
@@ -340,7 +343,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
340
343
} )
341
344
}
342
345
343
- pub fn goal_evaluation_step ( & mut self , goal_evaluation_step : ProofTreeBuilder < D > ) {
346
+ pub ( crate ) fn goal_evaluation_step ( & mut self , goal_evaluation_step : ProofTreeBuilder < D > ) {
344
347
if let Some ( this) = self . as_mut ( ) {
345
348
match ( this, * goal_evaluation_step. state . unwrap ( ) ) {
346
349
(
@@ -354,7 +357,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
354
357
}
355
358
}
356
359
357
- pub fn add_var_value < T : Into < I :: GenericArg > > ( & mut self , arg : T ) {
360
+ pub ( crate ) fn add_var_value < T : Into < I :: GenericArg > > ( & mut self , arg : T ) {
358
361
match self . as_mut ( ) {
359
362
None => { }
360
363
Some ( DebugSolver :: CanonicalGoalEvaluationStep ( state) ) => {
@@ -364,7 +367,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
364
367
}
365
368
}
366
369
367
- pub fn enter_probe ( & mut self ) {
370
+ fn enter_probe ( & mut self ) {
368
371
match self . as_mut ( ) {
369
372
None => { }
370
373
Some ( DebugSolver :: CanonicalGoalEvaluationStep ( state) ) => {
@@ -381,7 +384,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
381
384
}
382
385
}
383
386
384
- pub fn probe_kind ( & mut self , probe_kind : inspect:: ProbeKind < I > ) {
387
+ pub ( crate ) fn probe_kind ( & mut self , probe_kind : inspect:: ProbeKind < I > ) {
385
388
match self . as_mut ( ) {
386
389
None => { }
387
390
Some ( DebugSolver :: CanonicalGoalEvaluationStep ( state) ) => {
@@ -392,7 +395,11 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
392
395
}
393
396
}
394
397
395
- pub fn probe_final_state ( & mut self , delegate : & D , max_input_universe : ty:: UniverseIndex ) {
398
+ pub ( crate ) fn probe_final_state (
399
+ & mut self ,
400
+ delegate : & D ,
401
+ max_input_universe : ty:: UniverseIndex ,
402
+ ) {
396
403
match self . as_mut ( ) {
397
404
None => { }
398
405
Some ( DebugSolver :: CanonicalGoalEvaluationStep ( state) ) => {
@@ -409,7 +416,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
409
416
}
410
417
}
411
418
412
- pub fn add_normalizes_to_goal (
419
+ pub ( crate ) fn add_normalizes_to_goal (
413
420
& mut self ,
414
421
delegate : & D ,
415
422
max_input_universe : ty:: UniverseIndex ,
@@ -423,7 +430,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
423
430
) ;
424
431
}
425
432
426
- pub fn add_goal (
433
+ pub ( crate ) fn add_goal (
427
434
& mut self ,
428
435
delegate : & D ,
429
436
max_input_universe : ty:: UniverseIndex ,
@@ -469,7 +476,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
469
476
}
470
477
}
471
478
472
- pub fn make_canonical_response ( & mut self , shallow_certainty : Certainty ) {
479
+ pub ( crate ) fn make_canonical_response ( & mut self , shallow_certainty : Certainty ) {
473
480
match self . as_mut ( ) {
474
481
Some ( DebugSolver :: CanonicalGoalEvaluationStep ( state) ) => {
475
482
state
@@ -482,7 +489,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
482
489
}
483
490
}
484
491
485
- pub fn finish_probe ( mut self ) -> ProofTreeBuilder < D > {
492
+ pub ( crate ) fn finish_probe ( mut self ) -> ProofTreeBuilder < D > {
486
493
match self . as_mut ( ) {
487
494
None => { }
488
495
Some ( DebugSolver :: CanonicalGoalEvaluationStep ( state) ) => {
@@ -497,7 +504,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
497
504
self
498
505
}
499
506
500
- pub fn query_result ( & mut self , result : QueryResult < I > ) {
507
+ pub ( crate ) fn query_result ( & mut self , result : QueryResult < I > ) {
501
508
if let Some ( this) = self . as_mut ( ) {
502
509
match this {
503
510
DebugSolver :: CanonicalGoalEvaluation ( canonical_goal_evaluation) => {
0 commit comments