Skip to content

Commit 201afa6

Browse files
committed
Minor comment tweaks.
1 parent f22bb2e commit 201afa6

File tree

1 file changed

+6
-10
lines changed
  • src/librustc_data_structures/obligation_forest

1 file changed

+6
-10
lines changed

src/librustc_data_structures/obligation_forest/mod.rs

+6-10
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl<O: ForestObligation> ObligationForest<O> {
285285
let _ = self.register_obligation_at(obligation, None);
286286
}
287287

288-
// returns Err(()) if we already know this obligation failed.
288+
// Returns Err(()) if we already know this obligation failed.
289289
fn register_obligation_at(&mut self, obligation: O, parent: Option<NodeIndex>)
290290
-> Result<(), ()>
291291
{
@@ -425,7 +425,7 @@ impl<O: ForestObligation> ObligationForest<O> {
425425
Some(NodeIndex::new(i))
426426
);
427427
if let Err(()) = st {
428-
// error already reported - propagate it
428+
// Error already reported - propagate it
429429
// to our node.
430430
self.error_at(i);
431431
}
@@ -454,8 +454,6 @@ impl<O: ForestObligation> ObligationForest<O> {
454454

455455
self.mark_as_waiting();
456456
self.process_cycles(processor);
457-
458-
// Now we have to compress the result
459457
let completed = self.compress(do_completed);
460458

461459
debug!("process_obligations: complete");
@@ -516,11 +514,11 @@ impl<O: ForestObligation> ObligationForest<O> {
516514
node.state.set(NodeState::Done);
517515
},
518516
NodeState::Waiting | NodeState::Pending => {
519-
// this node is still reachable from some pending node. We
517+
// This node is still reachable from some pending node. We
520518
// will get to it when they are all processed.
521519
}
522520
NodeState::Done | NodeState::Error => {
523-
// already processed that node
521+
// Already processed that node.
524522
}
525523
};
526524
}
@@ -664,8 +662,7 @@ impl<O: ForestObligation> ObligationForest<O> {
664662
return if do_completed == DoCompleted::Yes { Some(vec![]) } else { None };
665663
}
666664

667-
// Pop off all the nodes we killed and extract the success
668-
// stories.
665+
// Pop off all the nodes we killed and extract the success stories.
669666
let successful = if do_completed == DoCompleted::Yes {
670667
Some((0..dead_nodes)
671668
.map(|_| self.nodes.pop().unwrap())
@@ -696,7 +693,6 @@ impl<O: ForestObligation> ObligationForest<O> {
696693
if let Some(index) = node.parent {
697694
let new_i = node_rewrites[index.index()];
698695
if new_i >= nodes_len {
699-
// parent dead due to error
700696
node.parent = None;
701697
} else {
702698
node.parent = Some(NodeIndex::new(new_i));
@@ -745,7 +741,7 @@ impl<O> Node<O> {
745741
}
746742
}
747743

748-
// I need a Clone closure
744+
// I need a Clone closure.
749745
#[derive(Clone)]
750746
struct GetObligation<'a, O>(&'a [Node<O>]);
751747

0 commit comments

Comments
 (0)