diff options
| author | David Tolnay <dtolnay@gmail.com> | 2017-09-24 22:23:26 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2017-09-24 22:27:39 -0700 |
| commit | 874124b2c73dc764aa83f7ba9711a4170c0aeffc (patch) | |
| tree | 84495028597a1c6d1e7b62f842a7a8069806cbf0 /src/libcore | |
| parent | 7a9cdc4c2a98c3a889604762dccd463757079798 (diff) | |
| download | rust-874124b2c73dc764aa83f7ba9711a4170c0aeffc.tar.gz rust-874124b2c73dc764aa83f7ba9711a4170c0aeffc.zip | |
Backport libs stabilizations to 1.21 beta
This includes the following stabilizations: - tcpstream_connect_timeout https://github.com/rust-lang/rust/pull/44563 - iterator_for_each https://github.com/rust-lang/rust/pull/44567 - ord_max_min https://github.com/rust-lang/rust/pull/44593 - compiler_fences https://github.com/rust-lang/rust/pull/44595 - needs_drop https://github.com/rust-lang/rust/pull/44639 - vec_splice https://github.com/rust-lang/rust/pull/44640
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cmp.rs | 4 | ||||
| -rw-r--r-- | src/libcore/iter/iterator.rs | 2 | ||||
| -rw-r--r-- | src/libcore/mem.rs | 2 | ||||
| -rw-r--r-- | src/libcore/sync/atomic.rs | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 6f86f8caad0..e012cbd76ff 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -456,7 +456,7 @@ pub trait Ord: Eq + PartialOrd<Self> { /// assert_eq!(2, 1.max(2)); /// assert_eq!(2, 2.max(2)); /// ``` - #[stable(feature = "ord_max_min", since = "1.22.0")] + #[stable(feature = "ord_max_min", since = "1.21.0")] fn max(self, other: Self) -> Self where Self: Sized { if other >= self { other } else { self } @@ -472,7 +472,7 @@ pub trait Ord: Eq + PartialOrd<Self> { /// assert_eq!(1, 1.min(2)); /// assert_eq!(2, 2.min(2)); /// ``` - #[stable(feature = "ord_max_min", since = "1.22.0")] + #[stable(feature = "ord_max_min", since = "1.21.0")] fn min(self, other: Self) -> Self where Self: Sized { if self <= other { self } else { other } diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index 36bf9633b4a..e9e31065cf8 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -518,7 +518,7 @@ pub trait Iterator { /// .for_each(|(i, x)| println!("{}:{}", i, x)); /// ``` #[inline] - #[stable(feature = "iterator_for_each", since = "1.22.0")] + #[stable(feature = "iterator_for_each", since = "1.21.0")] fn for_each<F>(self, mut f: F) where Self: Sized, F: FnMut(Self::Item), { diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 669b93120cf..c869054cee8 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -402,7 +402,7 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize { /// } /// ``` #[inline] -#[stable(feature = "needs_drop", since = "1.22.0")] +#[stable(feature = "needs_drop", since = "1.21.0")] pub fn needs_drop<T>() -> bool { unsafe { intrinsics::needs_drop::<T>() } } diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index 3dd08e69710..2bb40cb672e 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -1752,7 +1752,7 @@ pub fn fence(order: Ordering) { /// [`Relaxed`]: enum.Ordering.html#variant.Relaxed /// [memory barriers]: https://www.kernel.org/doc/Documentation/memory-barriers.txt #[inline] -#[stable(feature = "compiler_fences", since = "1.22.0")] +#[stable(feature = "compiler_fences", since = "1.21.0")] pub fn compiler_fence(order: Ordering) { unsafe { match order { |
