about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorChai T. Rex <ChaiTRex@users.noreply.github.com>2020-10-18 15:45:09 -0400
committerChai T. Rex <ChaiTRex@users.noreply.github.com>2020-10-18 15:45:09 -0400
commitc2de8fe29443d8c9c70da66dee2c99d4c8d04930 (patch)
tree626683e48816059c6b02c3d9e06cdccea2cfa2b7 /library/std/src
parent98e16884b10630e6e6ef5f4a076af3409122401d (diff)
downloadrust-c2de8fe29443d8c9c70da66dee2c99d4c8d04930.tar.gz
rust-c2de8fe29443d8c9c70da66dee2c99d4c8d04930.zip
Stabilize or_insert_with_key
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/collections/hash/map.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs
index 114707b639b..3d130c1628e 100644
--- a/library/std/src/collections/hash/map.rs
+++ b/library/std/src/collections/hash/map.rs
@@ -2229,7 +2229,6 @@ impl<'a, K, V> Entry<'a, K, V> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(or_insert_with_key)]
     /// use std::collections::HashMap;
     ///
     /// let mut map: HashMap<&str, usize> = HashMap::new();
@@ -2239,7 +2238,7 @@ impl<'a, K, V> Entry<'a, K, V> {
     /// assert_eq!(map["poneyland"], 9);
     /// ```
     #[inline]
-    #[unstable(feature = "or_insert_with_key", issue = "71024")]
+    #[stable(feature = "or_insert_with_key", since = "1.49.0")]
     pub fn or_insert_with_key<F: FnOnce(&K) -> V>(self, default: F) -> &'a mut V {
         match self {
             Occupied(entry) => entry.into_mut(),