File tree 1 file changed +5
-8
lines changed
compiler/rustc_data_structures/src/obligation_forest
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -634,17 +634,14 @@ impl<O: ForestObligation> ObligationForest<O> {
634
634
}
635
635
}
636
636
NodeState :: Done => {
637
- // This lookup can fail because the contents of
637
+ // The removal lookup might fail because the contents of
638
638
// `self.active_cache` are not guaranteed to match those of
639
639
// `self.nodes`. See the comment in `process_obligation`
640
640
// for more details.
641
- if let Some ( ( predicate, _) ) =
642
- self . active_cache . remove_entry ( & node. obligation . as_cache_key ( ) )
643
- {
644
- self . done_cache . insert ( predicate) ;
645
- } else {
646
- self . done_cache . insert ( node. obligation . as_cache_key ( ) . clone ( ) ) ;
647
- }
641
+ let cache_key = node. obligation . as_cache_key ( ) ;
642
+ self . active_cache . remove ( & cache_key) ;
643
+ self . done_cache . insert ( cache_key) ;
644
+
648
645
// Extract the success stories.
649
646
outcome_cb ( & node. obligation ) ;
650
647
node_rewrites[ index] = orig_nodes_len;
You can’t perform that action at this time.
0 commit comments