@@ -570,7 +570,19 @@ impl<O: ForestObligation> ObligationForest<O> {
570570 #[ inline( always) ]
571571 fn inlined_mark_neighbors_as_waiting_from ( & self , node : & Node < O > ) {
572572 for & index in node. dependents . iter ( ) {
573- self . mark_as_waiting_from ( & self . nodes [ index] ) ;
573+ let node = & self . nodes [ index] ;
574+ match node. state . get ( ) {
575+ NodeState :: Waiting | NodeState :: Error => { }
576+ NodeState :: Success => {
577+ node. state . set ( NodeState :: Waiting ) ;
578+ // This call site is cold.
579+ self . uninlined_mark_neighbors_as_waiting_from ( node) ;
580+ }
581+ NodeState :: Pending | NodeState :: Done => {
582+ // This call site is cold.
583+ self . uninlined_mark_neighbors_as_waiting_from ( node) ;
584+ }
585+ }
574586 }
575587 }
576588
@@ -596,17 +608,6 @@ impl<O: ForestObligation> ObligationForest<O> {
596608 }
597609 }
598610
599- fn mark_as_waiting_from ( & self , node : & Node < O > ) {
600- match node. state . get ( ) {
601- NodeState :: Waiting | NodeState :: Error => return ,
602- NodeState :: Success => node. state . set ( NodeState :: Waiting ) ,
603- NodeState :: Pending | NodeState :: Done => { } ,
604- }
605-
606- // This call site is cold.
607- self . uninlined_mark_neighbors_as_waiting_from ( node) ;
608- }
609-
610611 /// Compresses the vector, removing all popped nodes. This adjusts
611612 /// the indices and hence invalidates any outstanding
612613 /// indices. Cannot be used during a transaction.
0 commit comments