@@ -329,10 +329,7 @@ impl<O: ForestObligation> ObligationForest<O> {
329
329
330
330
match self . active_cache . entry ( obligation. as_predicate ( ) . clone ( ) ) {
331
331
Entry :: Occupied ( o) => {
332
- let index = * o. get ( ) ;
333
- debug ! ( "register_obligation_at({:?}, {:?}) - duplicate of {:?}!" ,
334
- obligation, parent, index) ;
335
- let node = & mut self . nodes [ index] ;
332
+ let node = & mut self . nodes [ * o. get ( ) ] ;
336
333
if let Some ( parent_index) = parent {
337
334
// If the node is already in `active_cache`, it has already
338
335
// had its chance to be marked with a parent. So if it's
@@ -349,9 +346,6 @@ impl<O: ForestObligation> ObligationForest<O> {
349
346
}
350
347
}
351
348
Entry :: Vacant ( v) => {
352
- debug ! ( "register_obligation_at({:?}, {:?}) - ok, new index is {}" ,
353
- obligation, parent, self . nodes. len( ) ) ;
354
-
355
349
let obligation_tree_id = match parent {
356
350
Some ( parent_index) => self . nodes [ parent_index] . obligation_tree_id ,
357
351
None => self . obligation_tree_id_generator . next ( ) . unwrap ( ) ,
@@ -431,8 +425,6 @@ impl<O: ForestObligation> ObligationForest<O> {
431
425
-> Outcome < O , P :: Error >
432
426
where P : ObligationProcessor < Obligation =O >
433
427
{
434
- debug ! ( "process_obligations(len={})" , self . nodes. len( ) ) ;
435
-
436
428
self . gen += 1 ;
437
429
438
430
let mut errors = vec ! [ ] ;
@@ -450,8 +442,6 @@ impl<O: ForestObligation> ObligationForest<O> {
450
442
while index < self . nodes . len ( ) {
451
443
let node = & mut self . nodes [ index] ;
452
444
453
- debug ! ( "process_obligations: node {} == {:?}" , index, node) ;
454
-
455
445
// `processor.process_obligation` can modify the predicate within
456
446
// `node.obligation`, and that predicate is the key used for
457
447
// `self.active_cache`. This means that `self.active_cache` can get
@@ -463,8 +453,6 @@ impl<O: ForestObligation> ObligationForest<O> {
463
453
}
464
454
let result = processor. process_obligation ( & mut node. obligation ) ;
465
455
466
- debug ! ( "process_obligations: node {} got result {:?}" , index, result) ;
467
-
468
456
match result {
469
457
ProcessResult :: Unchanged => {
470
458
// No change in state.
@@ -511,8 +499,6 @@ impl<O: ForestObligation> ObligationForest<O> {
511
499
self . process_cycles ( processor) ;
512
500
let completed = self . compress ( do_completed) ;
513
501
514
- debug ! ( "process_obligations: complete" ) ;
515
-
516
502
Outcome {
517
503
completed,
518
504
errors,
@@ -593,8 +579,6 @@ impl<O: ForestObligation> ObligationForest<O> {
593
579
{
594
580
let mut stack = vec ! [ ] ;
595
581
596
- debug ! ( "process_cycles()" ) ;
597
-
598
582
for ( index, node) in self . nodes . iter ( ) . enumerate ( ) {
599
583
// For some benchmarks this state test is extremely hot. It's a win
600
584
// to handle the no-op cases immediately to avoid the cost of the
@@ -606,8 +590,6 @@ impl<O: ForestObligation> ObligationForest<O> {
606
590
}
607
591
}
608
592
609
- debug ! ( "process_cycles: complete" ) ;
610
-
611
593
debug_assert ! ( stack. is_empty( ) ) ;
612
594
}
613
595
0 commit comments