Skip to content

Commit 86e0303

Browse files
committed
Make sure cold code is as small as possible
1 parent 5565241 commit 86e0303

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_data_structures/src/obligation_forest

1 file changed

+2
-1
lines changed

compiler/rustc_data_structures/src/obligation_forest/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,6 @@ impl<O: ForestObligation> ObligationForest<O> {
526526
let node = &self.nodes[index];
527527
let state = node.state.get();
528528
if state == NodeState::Success {
529-
node.state.set(NodeState::Waiting);
530529
// This call site is cold.
531530
self.uninlined_mark_dependents_as_waiting(node);
532531
} else {
@@ -538,6 +537,8 @@ impl<O: ForestObligation> ObligationForest<O> {
538537
// This never-inlined function is for the cold call site.
539538
#[inline(never)]
540539
fn uninlined_mark_dependents_as_waiting(&self, node: &Node<O>) {
540+
// Mark node Waiting in the cold uninlined code instead of the hot inlined
541+
node.state.set(NodeState::Waiting);
541542
self.inlined_mark_dependents_as_waiting(node)
542543
}
543544

0 commit comments

Comments
 (0)