We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
retain
waiting_cache
apply_rewrites()
1 parent 6e48053 commit f22bb2eCopy full SHA for f22bb2e
src/librustc_data_structures/obligation_forest/mod.rs
@@ -717,17 +717,15 @@ impl<O: ForestObligation> ObligationForest<O> {
717
718
// This updating of `self.waiting_cache` is necessary because the
719
// removal of nodes within `compress` can fail. See above.
720
- let mut kill_list = vec![];
721
- for (predicate, index) in &mut self.waiting_cache {
+ self.waiting_cache.retain(|_predicate, index| {
722
let new_i = node_rewrites[index.index()];
723
if new_i >= nodes_len {
724
- kill_list.push(predicate.clone());
+ false
725
} else {
726
*index = NodeIndex::new(new_i);
+ true
727
}
728
- }
729
-
730
- for predicate in kill_list { self.waiting_cache.remove(&predicate); }
+ });
731
732
733
0 commit comments