diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2015-08-31 22:38:34 -0700 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2015-09-01 01:22:57 -0700 |
| commit | b82c42c153f6cf2b8bb2aee641621a605d890e3f (patch) | |
| tree | 05128f92402a60d15350e74ec1e17c7aff2b5547 | |
| parent | 09dd65c2f60ba635378d2e9afdb1ca4775d8e76c (diff) | |
| download | rust-b82c42c153f6cf2b8bb2aee641621a605d890e3f.tar.gz rust-b82c42c153f6cf2b8bb2aee641621a605d890e3f.zip | |
Add missing stability markings to BinaryHeap.
| -rw-r--r-- | src/libcollections/binary_heap.rs | 31 | ||||
| -rw-r--r-- | src/libcollectionstest/lib.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass/binary-heap-panic-safe.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/while-let.rs | 2 |
4 files changed, 26 insertions, 10 deletions
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index bedeab67420..3ca69736126 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -214,11 +214,14 @@ impl<T: Ord> BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![9, 1, 2, 7, 3, 2]); /// ``` + #[unstable(feature = "binary_heap_extras", + reason = "needs to be audited", + issue = "28147")] pub fn from_vec(vec: Vec<T>) -> BinaryHeap<T> { let mut heap = BinaryHeap { data: vec }; let mut n = heap.len() / 2; @@ -235,7 +238,7 @@ impl<T: Ord> BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]); @@ -341,7 +344,7 @@ impl<T: Ord> BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::from_vec(vec![1, 3]); @@ -388,7 +391,7 @@ impl<T: Ord> BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::new(); @@ -400,6 +403,9 @@ impl<T: Ord> BinaryHeap<T> { /// assert_eq!(heap.len(), 2); /// assert_eq!(heap.peek(), Some(&3)); /// ``` + #[unstable(feature = "binary_heap_extras", + reason = "needs to be audited", + issue = "28147")] pub fn push_pop(&mut self, mut item: T) -> T { match self.data.get_mut(0) { None => return item, @@ -421,7 +427,7 @@ impl<T: Ord> BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::new(); @@ -431,6 +437,9 @@ impl<T: Ord> BinaryHeap<T> { /// assert_eq!(heap.len(), 1); /// assert_eq!(heap.peek(), Some(&3)); /// ``` + #[unstable(feature = "binary_heap_extras", + reason = "needs to be audited", + issue = "28147")] pub fn replace(&mut self, mut item: T) -> Option<T> { if !self.is_empty() { swap(&mut item, &mut self.data[0]); @@ -448,7 +457,7 @@ impl<T: Ord> BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4, 5, 6, 7]); @@ -459,6 +468,9 @@ impl<T: Ord> BinaryHeap<T> { /// println!("{}", x); /// } /// ``` + #[unstable(feature = "binary_heap_extras", + reason = "needs to be audited", + issue = "28147")] pub fn into_vec(self) -> Vec<T> { self.data } /// Consumes the `BinaryHeap` and returns a vector in sorted @@ -467,7 +479,7 @@ impl<T: Ord> BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// @@ -478,6 +490,9 @@ impl<T: Ord> BinaryHeap<T> { /// let vec = heap.into_sorted_vec(); /// assert_eq!(vec, [1, 2, 3, 4, 5, 6, 7]); /// ``` + #[unstable(feature = "binary_heap_extras", + reason = "needs to be audited", + issue = "28147")] pub fn into_sorted_vec(mut self) -> Vec<T> { let mut end = self.len(); while end > 1 { @@ -730,7 +745,7 @@ impl<T: Ord> IntoIterator for BinaryHeap<T> { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]); diff --git a/src/libcollectionstest/lib.rs b/src/libcollectionstest/lib.rs index 5748c105eed..d84f5bdf107 100644 --- a/src/libcollectionstest/lib.rs +++ b/src/libcollectionstest/lib.rs @@ -10,6 +10,7 @@ #![feature(ascii)] #![feature(append)] +#![feature(binary_heap_extras)] #![feature(box_syntax)] #![feature(btree_range)] #![feature(collections)] diff --git a/src/test/run-pass/binary-heap-panic-safe.rs b/src/test/run-pass/binary-heap-panic-safe.rs index 61a7fab1309..8bdac6808d0 100644 --- a/src/test/run-pass/binary-heap-panic-safe.rs +++ b/src/test/run-pass/binary-heap-panic-safe.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(std_misc, collections, catch_panic, rand, sync_poison)] +#![feature(std_misc, binary_heap_extras, catch_panic, rand, sync_poison)] use std::__rand::{thread_rng, Rng}; use std::thread; diff --git a/src/test/run-pass/while-let.rs b/src/test/run-pass/while-let.rs index 5a2ecdd45db..efccff75a49 100644 --- a/src/test/run-pass/while-let.rs +++ b/src/test/run-pass/while-let.rs @@ -9,7 +9,7 @@ // except according to those terms. -#![feature(collections)] +#![feature(binary_heap_extras)] use std::collections::BinaryHeap; |
