about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorOli Scherer <github35764891676564198441@oli-obk.de>2021-07-19 16:50:43 +0000
committerOli Scherer <github35764891676564198441@oli-obk.de>2021-07-22 11:20:29 +0000
commit6d76002baf9d03372b05c96c7cdd7e89c501bdb0 (patch)
tree4d15995244a33d5ccc000d4b1f6132599a3e4635 /compiler/rustc_data_structures/src
parentd693a98f4ef508299c7c6550d9fb79d81f818d84 (diff)
downloadrust-6d76002baf9d03372b05c96c7cdd7e89c501bdb0.tar.gz
rust-6d76002baf9d03372b05c96c7cdd7e89c501bdb0.zip
Make mir borrowck's use of opaque types independent of the typeck query's result
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/vec_map.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/vec_map.rs b/compiler/rustc_data_structures/src/vec_map.rs
index 96e33184658..e3fa587985d 100644
--- a/compiler/rustc_data_structures/src/vec_map.rs
+++ b/compiler/rustc_data_structures/src/vec_map.rs
@@ -70,6 +70,10 @@ where
     pub fn iter_mut(&mut self) -> impl Iterator<Item = (&K, &mut V)> {
         self.into_iter()
     }
+
+    pub fn retain(&mut self, f: impl Fn(&(K, V)) -> bool) {
+        self.0.retain(f)
+    }
 }
 
 impl<K, V> Default for VecMap<K, V> {