about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-19 05:08:13 +0000
committerbors <bors@rust-lang.org>2022-02-19 05:08:13 +0000
commitcb4ee81ef555126e49b3e9f16ca6f12a3264a451 (patch)
tree0cbece72dbd10229175fb82ab6687289d3d90a45
parent1882597991277f9467d2a187f180f76eecf45c9c (diff)
parent319dd150fca1455062df9493739241e1af646650 (diff)
downloadrust-cb4ee81ef555126e49b3e9f16ca6f12a3264a451.tar.gz
rust-cb4ee81ef555126e49b3e9f16ca6f12a3264a451.zip
Auto merge of #94105 - 5225225:destabilise-entry-insert, r=Mark-Simulacrum
Destabilise entry_insert

See: https://github.com/rust-lang/rust/pull/90345

I didn't revert the rename that was done in that PR, I left it as `entry_insert`.

Additionally, before that PR, `VacantEntry::insert_entry` seemingly had no stability attribute on it? I kept the attribute, just made it an unstable one, same as the one on `Entry`.

There didn't seem to be any mention of this in the RELEASES.md, so I don't think there's anything for me to do other than this?
-rw-r--r--library/std/src/collections/hash/map.rs6
1 files 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 @@ impl<'a, K, V> Entry<'a, K, V> {
     /// # Examples
     ///
     /// ```
+    /// #![feature(entry_insert)]
     /// use std::collections::HashMap;
     ///
     /// let mut map: HashMap<&str, String> = HashMap::new();
@@ -2480,7 +2481,7 @@ impl<'a, K, V> Entry<'a, K, V> {
     /// 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 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
     /// # Examples
     ///
     /// ```
+    /// #![feature(entry_insert)]
     /// use std::collections::HashMap;
     /// use std::collections::hash_map::Entry;
     ///
@@ -2825,7 +2827,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, 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 }