about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-07-14 16:49:02 -0700
committerJubilee Young <workingjubilee@gmail.com>2024-07-14 16:49:16 -0700
commit87d850dff053fb622e56ec0c865a8462d379e649 (patch)
tree85e935b957bce3b3bb2553b99b4936bebb5cb8a2
parent4572ed63899d5f692cf4f34ce374d634aa104c73 (diff)
downloadrust-87d850dff053fb622e56ec0c865a8462d379e649.tar.gz
rust-87d850dff053fb622e56ec0c865a8462d379e649.zip
std: Unsafe-wrap HashMap::get_many_unchecked_mut
-rw-r--r--library/std/src/collections/hash/map.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs
index 955f4013ab6..1f6a3e90479 100644
--- a/library/std/src/collections/hash/map.rs
+++ b/library/std/src/collections/hash/map.rs
@@ -1,5 +1,3 @@
-#![allow(unsafe_op_in_unsafe_fn)]
-
 #[cfg(test)]
 mod tests;
 
@@ -1020,7 +1018,7 @@ where
         K: Borrow<Q>,
         Q: Hash + Eq,
     {
-        self.base.get_many_unchecked_mut(ks)
+        unsafe { self.base.get_many_unchecked_mut(ks) }
     }
 
     /// Returns `true` if the map contains a value for the specified key.