about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-08-11 14:08:24 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-08-19 11:59:56 -0700
commitafeeadeae5094a374821a32cc78a47109c7304ea (patch)
tree547f12cb21d41858b453bc8ad9f4fa2d14e09ac0 /src/libstd/collections
parent9d6520f97ba9062e6a6103f4038357e928d2f851 (diff)
std: Stabilize APIs for the 1.12 release
Stabilized

* `Cell::as_ptr`
* `RefCell::as_ptr`
* `IpAddr::is_{unspecified,loopback,multicast}`
* `Ipv6Addr::octets`
* `LinkedList::contains`
* `VecDeque::contains`
* `ExitStatusExt::from_raw` - both on Unix and Windows
* `Receiver::recv_timeout`
* `RecvTimeoutError`
* `BinaryHeap::peek_mut`
* `PeekMut`
* `iter::Product`
* `iter::Sum`
* `OccupiedEntry::remove_entry`
* `VacantEntry::into_key`

Deprecated

* `Cell::as_unsafe_cell`
* `RefCell::as_unsafe_cell`
* `OccupiedEntry::remove_pair`

Closes #27708
cc #27709
Closes #32313
Closes #32630
Closes #32713
Closes #34029
Closes #34392
Closes #34285
Closes #34529
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/hash/map.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index cf6f76f914a..3d3e3941bac 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -1640,13 +1640,18 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
         self.elem.read().0
     }
 
+    /// Deprecated, renamed to `remove_entry`
+    #[unstable(feature = "map_entry_recover_keys", issue = "34285")]
+    #[rustc_deprecated(since = "1.12.0", reason = "renamed to `remove_entry`")]
+    pub fn remove_pair(self) -> (K, V) {
+        self.remove_entry()
+    }
+
     /// Take the ownership of the key and value from the map.
     ///
     /// # Examples
     ///
     /// ```
-    /// #![feature(map_entry_recover_keys)]
-    ///
     /// use std::collections::HashMap;
     /// use std::collections::hash_map::Entry;
     ///
@@ -1655,13 +1660,13 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
     ///
     /// if let Entry::Occupied(o) = map.entry("poneyland") {
     ///     // We delete the entry from the map.
-    ///     o.remove_pair();
+    ///     o.remove_entry();
     /// }
     ///
     /// assert_eq!(map.contains_key("poneyland"), false);
     /// ```
-    #[unstable(feature = "map_entry_recover_keys", issue = "34285")]
-    pub fn remove_pair(self) -> (K, V) {
+    #[stable(feature = "map_entry_recover_keys2", since = "1.12.0")]
+    pub fn remove_entry(self) -> (K, V) {
         pop_internal(self.elem)
     }
 
@@ -1808,8 +1813,6 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(map_entry_recover_keys)]
-    ///
     /// use std::collections::HashMap;
     /// use std::collections::hash_map::Entry;
     ///
@@ -1819,7 +1822,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
     ///     v.into_key();
     /// }
     /// ```
-    #[unstable(feature = "map_entry_recover_keys", issue = "34285")]
+    #[stable(feature = "map_entry_recover_keys2", since = "1.12.0")]
     pub fn into_key(self) -> K {
         self.key
     }