@@ -214,11 +214,14 @@ impl<T: Ord> BinaryHeap<T> {
214214 /// # Examples
215215 ///
216216 /// ```
217- /// #![feature(collections )]
217+ /// #![feature(binary_heap_extras )]
218218 ///
219219 /// use std::collections::BinaryHeap;
220220 /// let heap = BinaryHeap::from_vec(vec![9, 1, 2, 7, 3, 2]);
221221 /// ```
222+ #[ unstable( feature = "binary_heap_extras" ,
223+ reason = "needs to be audited" ,
224+ issue = "28147" ) ]
222225 pub fn from_vec ( vec : Vec < T > ) -> BinaryHeap < T > {
223226 let mut heap = BinaryHeap { data : vec } ;
224227 let mut n = heap. len ( ) / 2 ;
@@ -235,7 +238,7 @@ impl<T: Ord> BinaryHeap<T> {
235238 /// # Examples
236239 ///
237240 /// ```
238- /// #![feature(collections )]
241+ /// #![feature(binary_heap_extras )]
239242 ///
240243 /// use std::collections::BinaryHeap;
241244 /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]);
@@ -341,7 +344,7 @@ impl<T: Ord> BinaryHeap<T> {
341344 /// # Examples
342345 ///
343346 /// ```
344- /// #![feature(collections )]
347+ /// #![feature(binary_heap_extras )]
345348 ///
346349 /// use std::collections::BinaryHeap;
347350 /// let mut heap = BinaryHeap::from_vec(vec![1, 3]);
@@ -388,7 +391,7 @@ impl<T: Ord> BinaryHeap<T> {
388391 /// # Examples
389392 ///
390393 /// ```
391- /// #![feature(collections )]
394+ /// #![feature(binary_heap_extras )]
392395 ///
393396 /// use std::collections::BinaryHeap;
394397 /// let mut heap = BinaryHeap::new();
@@ -400,6 +403,9 @@ impl<T: Ord> BinaryHeap<T> {
400403 /// assert_eq!(heap.len(), 2);
401404 /// assert_eq!(heap.peek(), Some(&3));
402405 /// ```
406+ #[ unstable( feature = "binary_heap_extras" ,
407+ reason = "needs to be audited" ,
408+ issue = "28147" ) ]
403409 pub fn push_pop ( & mut self , mut item : T ) -> T {
404410 match self . data . get_mut ( 0 ) {
405411 None => return item,
@@ -421,7 +427,7 @@ impl<T: Ord> BinaryHeap<T> {
421427 /// # Examples
422428 ///
423429 /// ```
424- /// #![feature(collections )]
430+ /// #![feature(binary_heap_extras )]
425431 ///
426432 /// use std::collections::BinaryHeap;
427433 /// let mut heap = BinaryHeap::new();
@@ -431,6 +437,9 @@ impl<T: Ord> BinaryHeap<T> {
431437 /// assert_eq!(heap.len(), 1);
432438 /// assert_eq!(heap.peek(), Some(&3));
433439 /// ```
440+ #[ unstable( feature = "binary_heap_extras" ,
441+ reason = "needs to be audited" ,
442+ issue = "28147" ) ]
434443 pub fn replace ( & mut self , mut item : T ) -> Option < T > {
435444 if !self . is_empty ( ) {
436445 swap ( & mut item, & mut self . data [ 0 ] ) ;
@@ -448,7 +457,7 @@ impl<T: Ord> BinaryHeap<T> {
448457 /// # Examples
449458 ///
450459 /// ```
451- /// #![feature(collections )]
460+ /// #![feature(binary_heap_extras )]
452461 ///
453462 /// use std::collections::BinaryHeap;
454463 /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4, 5, 6, 7]);
@@ -459,6 +468,9 @@ impl<T: Ord> BinaryHeap<T> {
459468 /// println!("{}", x);
460469 /// }
461470 /// ```
471+ #[ unstable( feature = "binary_heap_extras" ,
472+ reason = "needs to be audited" ,
473+ issue = "28147" ) ]
462474 pub fn into_vec ( self ) -> Vec < T > { self . data }
463475
464476 /// Consumes the `BinaryHeap` and returns a vector in sorted
@@ -467,7 +479,7 @@ impl<T: Ord> BinaryHeap<T> {
467479 /// # Examples
468480 ///
469481 /// ```
470- /// #![feature(collections )]
482+ /// #![feature(binary_heap_extras )]
471483 ///
472484 /// use std::collections::BinaryHeap;
473485 ///
@@ -478,6 +490,9 @@ impl<T: Ord> BinaryHeap<T> {
478490 /// let vec = heap.into_sorted_vec();
479491 /// assert_eq!(vec, [1, 2, 3, 4, 5, 6, 7]);
480492 /// ```
493+ #[ unstable( feature = "binary_heap_extras" ,
494+ reason = "needs to be audited" ,
495+ issue = "28147" ) ]
481496 pub fn into_sorted_vec ( mut self ) -> Vec < T > {
482497 let mut end = self . len ( ) ;
483498 while end > 1 {
@@ -730,7 +745,7 @@ impl<T: Ord> IntoIterator for BinaryHeap<T> {
730745 /// # Examples
731746 ///
732747 /// ```
733- /// #![feature(collections )]
748+ /// #![feature(binary_heap_extras )]
734749 ///
735750 /// use std::collections::BinaryHeap;
736751 /// let heap = BinaryHeap::from_vec(vec![1, 2, 3, 4]);
0 commit comments