diff --git a/src/librustc_data_structures/obligation_forest/mod.rs b/src/librustc_data_structures/obligation_forest/mod.rs index 75ffa076b0848..1ffa279b3aa8f 100644 --- a/src/librustc_data_structures/obligation_forest/mod.rs +++ b/src/librustc_data_structures/obligation_forest/mod.rs @@ -222,7 +222,7 @@ impl Node { /// v /// Success /// | ^ -/// | | mark_as_waiting() +/// | | update_waiting_and_success_states() /// | v /// | Waiting /// | @@ -480,7 +480,7 @@ impl ObligationForest { }; } - self.mark_as_waiting(); + self.update_waiting_and_success_states(); self.process_cycles(processor); let completed = self.compress(do_completed); @@ -494,8 +494,8 @@ impl ObligationForest { } /// Mark all `Success` nodes as `Done` and report all cycles between them. - /// This should be called after `mark_as_waiting` updates the status of all - /// `Waiting` and `Success` nodes. + /// This should be called after `update_waiting_and_success_states` updates + /// the status of all `Waiting` and `Success` nodes. fn process_cycles

(&self, processor: &mut P) where P: ObligationProcessor { @@ -577,7 +577,7 @@ impl ObligationForest { // This always-inlined function is for the hot call site. #[inline(always)] - fn inlined_mark_neighbors_as_waiting_from(&self, node: &Node) { + fn inlined_mark_dependents_as_waiting(&self, node: &Node) { for &index in node.dependents.iter() { let node = &self.nodes[index]; match node.state.get() { @@ -585,11 +585,11 @@ impl ObligationForest { NodeState::Success => { node.state.set(NodeState::Waiting); // This call site is cold. - self.uninlined_mark_neighbors_as_waiting_from(node); + self.uninlined_mark_dependents_as_waiting(node); } NodeState::Pending | NodeState::Done => { // This call site is cold. - self.uninlined_mark_neighbors_as_waiting_from(node); + self.uninlined_mark_dependents_as_waiting(node); } } } @@ -597,14 +597,14 @@ impl ObligationForest { // This never-inlined function is for the cold call site. #[inline(never)] - fn uninlined_mark_neighbors_as_waiting_from(&self, node: &Node) { - self.inlined_mark_neighbors_as_waiting_from(node) + fn uninlined_mark_dependents_as_waiting(&self, node: &Node) { + self.inlined_mark_dependents_as_waiting(node) } /// Updates the states of all `Waiting` and `Success` nodes. Upon /// completion, all such nodes that depend on a pending node will be marked /// as `Waiting`, and all others will be marked as `Success`. - fn mark_as_waiting(&self) { + fn update_waiting_and_success_states(&self) { // Optimistically mark all `Waiting` nodes as `Success`. for node in &self.nodes { if node.state.get() == NodeState::Waiting { @@ -617,7 +617,7 @@ impl ObligationForest { for node in &self.nodes { if node.state.get() == NodeState::Pending { // This call site is hot. - self.inlined_mark_neighbors_as_waiting_from(node); + self.inlined_mark_dependents_as_waiting(node); } } }