Skip to content

Commit 1b45f76

Browse files
authored
Rollup merge of #94105 - 5225225:destabilise-entry-insert, r=Mark-Simulacrum
Destabilise entry_insert See: #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?
2 parents 84e5cc5 + 319dd15 commit 1b45f76

File tree

1 file changed

+4
-2
lines changed
  • library/std/src/collections/hash

1 file changed

+4
-2
lines changed

library/std/src/collections/hash/map.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -2472,6 +2472,7 @@ impl<'a, K, V> Entry<'a, K, V> {
24722472
/// # Examples
24732473
///
24742474
/// ```
2475+
/// #![feature(entry_insert)]
24752476
/// use std::collections::HashMap;
24762477
///
24772478
/// let mut map: HashMap<&str, String> = HashMap::new();
@@ -2480,7 +2481,7 @@ impl<'a, K, V> Entry<'a, K, V> {
24802481
/// assert_eq!(entry.key(), &"poneyland");
24812482
/// ```
24822483
#[inline]
2483-
#[stable(feature = "entry_insert", since = "1.59.0")]
2484+
#[unstable(feature = "entry_insert", issue = "65225")]
24842485
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> {
24852486
match self {
24862487
Occupied(mut entry) => {
@@ -2814,6 +2815,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
28142815
/// # Examples
28152816
///
28162817
/// ```
2818+
/// #![feature(entry_insert)]
28172819
/// use std::collections::HashMap;
28182820
/// use std::collections::hash_map::Entry;
28192821
///
@@ -2825,7 +2827,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
28252827
/// assert_eq!(map["poneyland"], 37);
28262828
/// ```
28272829
#[inline]
2828-
#[stable(feature = "entry_insert", since = "1.59.0")]
2830+
#[unstable(feature = "entry_insert", issue = "65225")]
28292831
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V> {
28302832
let base = self.base.insert_entry(value);
28312833
OccupiedEntry { base }

0 commit comments

Comments
 (0)