Skip to content

Commit 4ec87d5

Browse files
committed
Remove some debug! statements.
Because I am tired of looking at them.
1 parent 7d55044 commit 4ec87d5

File tree

1 file changed

+1
-19
lines changed
  • src/librustc_data_structures/obligation_forest

1 file changed

+1
-19
lines changed

src/librustc_data_structures/obligation_forest/mod.rs

+1-19
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,7 @@ impl<O: ForestObligation> ObligationForest<O> {
329329

330330
match self.active_cache.entry(obligation.as_predicate().clone()) {
331331
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()];
336333
if let Some(parent_index) = parent {
337334
// If the node is already in `active_cache`, it has already
338335
// had its chance to be marked with a parent. So if it's
@@ -349,9 +346,6 @@ impl<O: ForestObligation> ObligationForest<O> {
349346
}
350347
}
351348
Entry::Vacant(v) => {
352-
debug!("register_obligation_at({:?}, {:?}) - ok, new index is {}",
353-
obligation, parent, self.nodes.len());
354-
355349
let obligation_tree_id = match parent {
356350
Some(parent_index) => self.nodes[parent_index].obligation_tree_id,
357351
None => self.obligation_tree_id_generator.next().unwrap(),
@@ -431,8 +425,6 @@ impl<O: ForestObligation> ObligationForest<O> {
431425
-> Outcome<O, P::Error>
432426
where P: ObligationProcessor<Obligation=O>
433427
{
434-
debug!("process_obligations(len={})", self.nodes.len());
435-
436428
self.gen += 1;
437429

438430
let mut errors = vec![];
@@ -450,8 +442,6 @@ impl<O: ForestObligation> ObligationForest<O> {
450442
while index < self.nodes.len() {
451443
let node = &mut self.nodes[index];
452444

453-
debug!("process_obligations: node {} == {:?}", index, node);
454-
455445
// `processor.process_obligation` can modify the predicate within
456446
// `node.obligation`, and that predicate is the key used for
457447
// `self.active_cache`. This means that `self.active_cache` can get
@@ -463,8 +453,6 @@ impl<O: ForestObligation> ObligationForest<O> {
463453
}
464454
let result = processor.process_obligation(&mut node.obligation);
465455

466-
debug!("process_obligations: node {} got result {:?}", index, result);
467-
468456
match result {
469457
ProcessResult::Unchanged => {
470458
// No change in state.
@@ -511,8 +499,6 @@ impl<O: ForestObligation> ObligationForest<O> {
511499
self.process_cycles(processor);
512500
let completed = self.compress(do_completed);
513501

514-
debug!("process_obligations: complete");
515-
516502
Outcome {
517503
completed,
518504
errors,
@@ -593,8 +579,6 @@ impl<O: ForestObligation> ObligationForest<O> {
593579
{
594580
let mut stack = vec![];
595581

596-
debug!("process_cycles()");
597-
598582
for (index, node) in self.nodes.iter().enumerate() {
599583
// For some benchmarks this state test is extremely hot. It's a win
600584
// to handle the no-op cases immediately to avoid the cost of the
@@ -606,8 +590,6 @@ impl<O: ForestObligation> ObligationForest<O> {
606590
}
607591
}
608592

609-
debug!("process_cycles: complete");
610-
611593
debug_assert!(stack.is_empty());
612594
}
613595

0 commit comments

Comments
 (0)