about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-11 17:39:34 +0000
committerbors <bors@rust-lang.org>2022-02-11 17:39:34 +0000
commit6499c5e7fc173a3f55b7a3bd1e6a50e9edef782d (patch)
tree1d240cbc577c36af2d033bbee49197e158d82f7f /compiler/rustc_data_structures/src
parent78450d2d602b06d9b94349aaf8cece1a4acaf3a8 (diff)
parentd54195db22421c51fd14560aba3bbf9b79a52677 (diff)
downloadrust-6499c5e7fc173a3f55b7a3bd1e6a50e9edef782d.tar.gz
rust-6499c5e7fc173a3f55b7a3bd1e6a50e9edef782d.zip
Auto merge of #93893 - oli-obk:sad_revert, r=oli-obk
Revert lazy TAIT PR

Revert https://github.com/rust-lang/rust/pull/92306 (sorry `@Aaron1011,` will include your changes in the fix PR)
Revert https://github.com/rust-lang/rust/pull/93783
Revert https://github.com/rust-lang/rust/pull/92007

fixes https://github.com/rust-lang/rust/issues/93788
fixes https://github.com/rust-lang/rust/issues/93794
fixes https://github.com/rust-lang/rust/issues/93821
fixes https://github.com/rust-lang/rust/issues/93831
fixes https://github.com/rust-lang/rust/issues/93841
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/vec_map.rs16
1 files changed, 1 insertions, 15 deletions
diff --git a/compiler/rustc_data_structures/src/vec_map.rs b/compiler/rustc_data_structures/src/vec_map.rs
index 2f4b3844430..cc7ec9432fa 100644
--- a/compiler/rustc_data_structures/src/vec_map.rs
+++ b/compiler/rustc_data_structures/src/vec_map.rs
@@ -30,11 +30,6 @@ where
         }
     }
 
-    /// Removes the entry from the map and returns the removed value
-    pub fn remove(&mut self, k: &K) -> Option<V> {
-        self.0.iter().position(|(k2, _)| k2 == k).map(|pos| self.0.remove(pos).1)
-    }
-
     /// Gets a reference to the value in the entry.
     pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V>
     where
@@ -44,15 +39,6 @@ where
         self.0.iter().find(|(key, _)| k == key.borrow()).map(|elem| &elem.1)
     }
 
-    /// Gets a mutable reference to the value in the entry.
-    pub fn get_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<&mut V>
-    where
-        K: Borrow<Q>,
-        Q: Eq,
-    {
-        self.0.iter_mut().find(|(key, _)| k == key.borrow()).map(|elem| &mut elem.1)
-    }
-
     /// Returns the any value corresponding to the supplied predicate filter.
     ///
     /// The supplied predicate will be applied to each (key, value) pair and it will return a
@@ -72,7 +58,7 @@ where
         // This should return just one element, otherwise it's a bug
         assert!(
             filter.next().is_none(),
-            "Collection {:#?} should have just one matching element",
+            "Collection {:?} should have just one matching element",
             self
         );
         Some(value)