Destabilise entry_insert

This commit is contained in:
5225225 2022-02-17 22:23:31 +00:00
parent 30b3f35c42
commit 319dd150fc

View File

@ -2472,6 +2472,7 @@ pub fn and_modify<F>(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<F>(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 }