File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
compiler/rustc_data_structures/src/obligation_forest Expand file tree Collapse file tree 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> {
634634 }
635635 }
636636 NodeState :: Done => {
637- // This lookup can fail because the contents of
637+ // The removal lookup might fail because the contents of
638638 // `self.active_cache` are not guaranteed to match those of
639639 // `self.nodes`. See the comment in `process_obligation`
640640 // 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+
648645 // Extract the success stories.
649646 outcome_cb ( & node. obligation ) ;
650647 node_rewrites[ index] = orig_nodes_len;
You can’t perform that action at this time.
0 commit comments