diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index bedeab67420cc..3ca6973612633 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -214,11 +214,14 @@ impl BinaryHeap { /// # 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) -> BinaryHeap { let mut heap = BinaryHeap { data: vec }; let mut n = heap.len() / 2; @@ -235,7 +238,7 @@ impl BinaryHeap { /// # 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 BinaryHeap { /// # 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 BinaryHeap { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::new(); @@ -400,6 +403,9 @@ impl BinaryHeap { /// 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 BinaryHeap { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// let mut heap = BinaryHeap::new(); @@ -431,6 +437,9 @@ impl BinaryHeap { /// 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 { if !self.is_empty() { swap(&mut item, &mut self.data[0]); @@ -448,7 +457,7 @@ impl BinaryHeap { /// # 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 BinaryHeap { /// println!("{}", x); /// } /// ``` + #[unstable(feature = "binary_heap_extras", + reason = "needs to be audited", + issue = "28147")] pub fn into_vec(self) -> Vec { self.data } /// Consumes the `BinaryHeap` and returns a vector in sorted @@ -467,7 +479,7 @@ impl BinaryHeap { /// # Examples /// /// ``` - /// #![feature(collections)] + /// #![feature(binary_heap_extras)] /// /// use std::collections::BinaryHeap; /// @@ -478,6 +490,9 @@ impl BinaryHeap { /// 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 { let mut end = self.len(); while end > 1 { @@ -730,7 +745,7 @@ impl IntoIterator for BinaryHeap { /// # 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 5748c105eed97..d84f5bdf10785 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 61a7fab130928..8bdac6808d089 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 5a2ecdd45dbe5..efccff75a49dd 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;