From 319dd150fca1455062df9493739241e1af646650 Mon Sep 17 00:00:00 2001 From: 5225225 <5225225@mailbox.org> Date: Thu, 17 Feb 2022 22:23:31 +0000 Subject: [PATCH] Destabilise entry_insert --- library/std/src/collections/hash/map.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index 9e61defc31e..c7e34962abb 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -2472,6 +2472,7 @@ pub fn and_modify(self, f: F) -> Self /// # Examples /// /// ``` + /// #![feature(entry_insert)] /// use std::collections::HashMap; /// /// let mut map: HashMap<&str, String> = HashMap::new(); @@ -2480,7 +2481,7 @@ pub fn and_modify(self, f: F) -> Self /// assert_eq!(entry.key(), &"poneyland"); /// ``` #[inline] - #[stable(feature = "entry_insert", since = "1.59.0")] + #[unstable(feature = "entry_insert", issue = "65225")] pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> { match self { Occupied(mut entry) => { @@ -2814,6 +2815,7 @@ pub fn insert(self, value: V) -> &'a mut V { /// # Examples /// /// ``` + /// #![feature(entry_insert)] /// use std::collections::HashMap; /// use std::collections::hash_map::Entry; /// @@ -2825,7 +2827,7 @@ pub fn insert(self, value: V) -> &'a mut V { /// assert_eq!(map["poneyland"], 37); /// ``` #[inline] - #[stable(feature = "entry_insert", since = "1.59.0")] + #[unstable(feature = "entry_insert", issue = "65225")] pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> { let base = self.base.insert_entry(value); OccupiedEntry { base }