Skip to content

Commit

Permalink
Destabilise entry_insert
Browse files Browse the repository at this point in the history
  • Loading branch information
5225225 committed Feb 17, 2022
1 parent 30b3f35 commit 319dd15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/std/src/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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) => {
Expand Down Expand Up @@ -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;
///
Expand All @@ -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 }
Expand Down

0 comments on commit 319dd15

Please sign in to comment.