File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
compiler/rustc_data_structures/src/obligation_forest Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -620,6 +620,29 @@ impl<O: ForestObligation> ObligationForest<O> {
620
620
continue ;
621
621
}
622
622
623
+ // One of the variables we stalled on unblocked us. If the node were blocked on other
624
+ // variables as well then remove those stalls. If the node is still stalled on one of
625
+ // those variables after `process_obligation` it will simply be added back to
626
+ // `self.stalled_on`
627
+ let stalled_on = node. obligation . stalled_on ( ) ;
628
+ if stalled_on. len ( ) > 1 {
629
+ for var in stalled_on {
630
+ match self . stalled_on . entry ( var. clone ( ) ) {
631
+ Entry :: Vacant ( _) => ( ) ,
632
+ Entry :: Occupied ( mut entry) => {
633
+ let nodes = entry. get_mut ( ) ;
634
+ if let Some ( i) = nodes. iter ( ) . position ( |x| * x == index) {
635
+ nodes. swap_remove ( i) ;
636
+ }
637
+ if nodes. is_empty ( ) {
638
+ processor. unwatch_variable ( var. clone ( ) ) ;
639
+ entry. remove ( ) ;
640
+ }
641
+ }
642
+ }
643
+ }
644
+ }
645
+
623
646
// `processor.process_obligation` can modify the predicate within
624
647
// `node.obligation`, and that predicate is the key used for
625
648
// `self.active_cache`. This means that `self.active_cache` can get
You can’t perform that action at this time.
0 commit comments