Address Alex's PR comments
This commit is contained in:
parent
f1913e2a30
commit
e365974750
|
@ -52,7 +52,7 @@
|
|||
#![feature(shared)]
|
||||
#![feature(slice_get_slice)]
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(sort_unstable)]
|
||||
#![cfg_attr(not(test), feature(sort_unstable))]
|
||||
#![feature(specialization)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(str_internals)]
|
||||
|
|
|
@ -1173,6 +1173,8 @@ impl<T> [T] {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(sort_unstable)]
|
||||
///
|
||||
/// let mut v = [-5, 4, 1, -3, 2];
|
||||
///
|
||||
/// v.sort_unstable();
|
||||
|
@ -1208,6 +1210,8 @@ impl<T> [T] {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(sort_unstable)]
|
||||
///
|
||||
/// let mut v = [5, 4, 1, 3, 2];
|
||||
/// v.sort_unstable_by(|a, b| a.cmp(b));
|
||||
/// assert!(v == [1, 2, 3, 4, 5]);
|
||||
|
@ -1246,6 +1250,8 @@ impl<T> [T] {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(sort_unstable)]
|
||||
///
|
||||
/// let mut v = [-5i32, 4, 1, -3, 2];
|
||||
///
|
||||
/// v.sort_unstable_by_key(|k| k.abs());
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
//! Unstable sorting is compatible with libcore because it doesn't allocate memory, unlike our
|
||||
//! stable sorting implementation.
|
||||
|
||||
#![unstable(feature = "sort_unstable", issue = "40585")]
|
||||
|
||||
use cmp;
|
||||
use mem;
|
||||
use ptr;
|
||||
|
|
Loading…
Reference in New Issue