Skip to content

Commit e365974

Browse files
author
Stjepan Glavina
committed
Address Alex's PR comments
1 parent f1913e2 commit e365974

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#![feature(shared)]
5353
#![feature(slice_get_slice)]
5454
#![feature(slice_patterns)]
55-
#![feature(sort_unstable)]
55+
#![cfg_attr(not(test), feature(sort_unstable))]
5656
#![feature(specialization)]
5757
#![feature(staged_api)]
5858
#![feature(str_internals)]

src/libcollections/slice.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,8 @@ impl<T> [T] {
11731173
/// # Examples
11741174
///
11751175
/// ```
1176+
/// #![feature(sort_unstable)]
1177+
///
11761178
/// let mut v = [-5, 4, 1, -3, 2];
11771179
///
11781180
/// v.sort_unstable();
@@ -1208,6 +1210,8 @@ impl<T> [T] {
12081210
/// # Examples
12091211
///
12101212
/// ```
1213+
/// #![feature(sort_unstable)]
1214+
///
12111215
/// let mut v = [5, 4, 1, 3, 2];
12121216
/// v.sort_unstable_by(|a, b| a.cmp(b));
12131217
/// assert!(v == [1, 2, 3, 4, 5]);
@@ -1246,6 +1250,8 @@ impl<T> [T] {
12461250
/// # Examples
12471251
///
12481252
/// ```
1253+
/// #![feature(sort_unstable)]
1254+
///
12491255
/// let mut v = [-5i32, 4, 1, -3, 2];
12501256
///
12511257
/// v.sort_unstable_by_key(|k| k.abs());

src/libcore/slice/sort.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
//! Unstable sorting is compatible with libcore because it doesn't allocate memory, unlike our
1717
//! stable sorting implementation.
1818
19-
#![unstable(feature = "sort_unstable", issue = "40585")]
20-
2119
use cmp;
2220
use mem;
2321
use ptr;

0 commit comments

Comments
 (0)