diff options
| author | bors <bors@rust-lang.org> | 2016-05-25 20:36:09 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-05-25 20:36:09 -0700 |
| commit | d5759a3417fa395d439f4283825504dd4f78dc87 (patch) | |
| tree | a5ea14cbe5a565002d0e427ea64f54cf4924afe3 /src/libcore | |
| parent | 267cde2598db3b858730cc1f700f740964343828 (diff) | |
| parent | cae91d7c8c21aa860bda29c62207a6726837952b (diff) | |
| download | rust-d5759a3417fa395d439f4283825504dd4f78dc87.tar.gz rust-d5759a3417fa395d439f4283825504dd4f78dc87.zip | |
Auto merge of #33699 - alexcrichton:stabilize-1.10, r=aturon
std: Stabilize APIs for the 1.10 release
This commit applies the FCP decisions made by the libs team for the 1.10 cycle,
including both new stabilizations and deprecations. Specifically, the list of
APIs is:
Stabilized:
* `os::windows::fs::OpenOptionsExt::access_mode`
* `os::windows::fs::OpenOptionsExt::share_mode`
* `os::windows::fs::OpenOptionsExt::custom_flags`
* `os::windows::fs::OpenOptionsExt::attributes`
* `os::windows::fs::OpenOptionsExt::security_qos_flags`
* `os::unix::fs::OpenOptionsExt::custom_flags`
* `sync::Weak::new`
* `Default for sync::Weak`
* `panic::set_hook`
* `panic::take_hook`
* `panic::PanicInfo`
* `panic::PanicInfo::payload`
* `panic::PanicInfo::location`
* `panic::Location`
* `panic::Location::file`
* `panic::Location::line`
* `ffi::CStr::from_bytes_with_nul`
* `ffi::CStr::from_bytes_with_nul_unchecked`
* `ffi::FromBytesWithNulError`
* `fs::Metadata::modified`
* `fs::Metadata::accessed`
* `fs::Metadata::created`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
* `SocketAddr::is_unnamed`
* `SocketAddr::as_pathname`
* `UnixStream::connect`
* `UnixStream::pair`
* `UnixStream::try_clone`
* `UnixStream::local_addr`
* `UnixStream::peer_addr`
* `UnixStream::set_read_timeout`
* `UnixStream::set_write_timeout`
* `UnixStream::read_timeout`
* `UnixStream::write_Timeout`
* `UnixStream::set_nonblocking`
* `UnixStream::take_error`
* `UnixStream::shutdown`
* Read/Write/RawFd impls for `UnixStream`
* `UnixListener::bind`
* `UnixListener::accept`
* `UnixListener::try_clone`
* `UnixListener::local_addr`
* `UnixListener::set_nonblocking`
* `UnixListener::take_error`
* `UnixListener::incoming`
* RawFd impls for `UnixListener`
* `UnixDatagram::bind`
* `UnixDatagram::unbound`
* `UnixDatagram::pair`
* `UnixDatagram::connect`
* `UnixDatagram::try_clone`
* `UnixDatagram::local_addr`
* `UnixDatagram::peer_addr`
* `UnixDatagram::recv_from`
* `UnixDatagram::recv`
* `UnixDatagram::send_to`
* `UnixDatagram::send`
* `UnixDatagram::set_read_timeout`
* `UnixDatagram::set_write_timeout`
* `UnixDatagram::read_timeout`
* `UnixDatagram::write_timeout`
* `UnixDatagram::set_nonblocking`
* `UnixDatagram::take_error`
* `UnixDatagram::shutdown`
* RawFd impls for `UnixDatagram`
* `{BTree,Hash}Map::values_mut`
* `<[_]>::binary_search_by_key`
Deprecated:
* `StaticCondvar` - this, and all other static synchronization primitives
below, are usable today through the lazy-static crate on
stable Rust today. Additionally, we'd like the non-static
versions to be directly usable in a static context one day,
so they're unlikely to be the final forms of the APIs in any
case.
* `CONDVAR_INIT`
* `StaticMutex`
* `MUTEX_INIT`
* `StaticRwLock`
* `RWLOCK_INIT`
* `iter::Peekable::is_empty`
Closes #27717
Closes #27720
Closes #30014
Closes #30425
Closes #30449
Closes #31190
Closes #31399
Closes #31767
Closes #32111
Closes #32281
Closes #32312
Closes #32551
Closes #33018
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/char.rs | 6 | ||||
| -rw-r--r-- | src/libcore/iter/mod.rs | 1 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 9 | ||||
| -rw-r--r-- | src/libcore/sync/atomic.rs | 18 |
4 files changed, 13 insertions, 21 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 65b9a27bb68..6a2331dddcf 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -15,11 +15,9 @@ #![allow(non_snake_case)] #![stable(feature = "core_char", since = "1.2.0")] -use iter::Iterator; +use prelude::v1::*; + use mem::transmute; -use option::Option::{None, Some}; -use option::Option; -use slice::SliceExt; // UTF-8 ranges and tags for encoding characters const TAG_CONT: u8 = 0b1000_0000; diff --git a/src/libcore/iter/mod.rs b/src/libcore/iter/mod.rs index 17f7c0a773e..f964527b4b4 100644 --- a/src/libcore/iter/mod.rs +++ b/src/libcore/iter/mod.rs @@ -1125,6 +1125,7 @@ impl<I: Iterator> Peekable<I> { /// ``` #[unstable(feature = "peekable_is_empty", issue = "32111")] #[inline] + #[rustc_deprecated(since = "1.10.0", reason = "replaced by .peek().is_none()")] pub fn is_empty(&mut self) -> bool { self.peek().is_none() } diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 542dfcbe628..a0e978f783d 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -106,6 +106,10 @@ pub trait SliceExt { #[stable(feature = "core", since = "1.6.0")] fn binary_search_by<F>(&self, f: F) -> Result<usize, usize> where F: FnMut(&Self::Item) -> Ordering; + #[stable(feature = "slice_binary_search_by_key", since = "1.10.0")] + fn binary_search_by_key<B, F>(&self, b: &B, f: F) -> Result<usize, usize> + where F: FnMut(&Self::Item) -> B, + B: Ord; #[stable(feature = "core", since = "1.6.0")] fn len(&self) -> usize; #[stable(feature = "core", since = "1.6.0")] @@ -157,11 +161,6 @@ pub trait SliceExt { fn clone_from_slice(&mut self, src: &[Self::Item]) where Self::Item: Clone; #[stable(feature = "copy_from_slice", since = "1.9.0")] fn copy_from_slice(&mut self, src: &[Self::Item]) where Self::Item: Copy; - - #[unstable(feature = "slice_binary_search_by_key", reason = "recently added", issue = "33018")] - fn binary_search_by_key<B, F>(&self, b: &B, f: F) -> Result<usize, usize> - where F: FnMut(&Self::Item) -> B, - B: Ord; } // Use macros to be generic over const/mut diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index 1bdab88d71d..d0a64de07e5 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -299,7 +299,6 @@ impl AtomicBool { /// # Examples /// /// ``` - /// # #![feature(extended_compare_and_swap)] /// use std::sync::atomic::{AtomicBool, Ordering}; /// /// let some_bool = AtomicBool::new(true); @@ -318,7 +317,7 @@ impl AtomicBool { /// assert_eq!(some_bool.load(Ordering::Relaxed), false); /// ``` #[inline] - #[unstable(feature = "extended_compare_and_swap", reason = "recently added", issue = "31767")] + #[stable(feature = "extended_compare_and_swap", since = "1.10.0")] pub fn compare_exchange(&self, current: bool, new: bool, @@ -347,7 +346,6 @@ impl AtomicBool { /// # Examples /// /// ``` - /// # #![feature(extended_compare_and_swap)] /// use std::sync::atomic::{AtomicBool, Ordering}; /// /// let val = AtomicBool::new(false); @@ -362,7 +360,7 @@ impl AtomicBool { /// } /// ``` #[inline] - #[unstable(feature = "extended_compare_and_swap", reason = "recently added", issue = "31767")] + #[stable(feature = "extended_compare_and_swap", since = "1.10.0")] pub fn compare_exchange_weak(&self, current: bool, new: bool, @@ -645,7 +643,6 @@ impl<T> AtomicPtr<T> { /// # Examples /// /// ``` - /// # #![feature(extended_compare_and_swap)] /// use std::sync::atomic::{AtomicPtr, Ordering}; /// /// let ptr = &mut 5; @@ -658,7 +655,7 @@ impl<T> AtomicPtr<T> { /// Ordering::SeqCst, Ordering::Relaxed); /// ``` #[inline] - #[unstable(feature = "extended_compare_and_swap", reason = "recently added", issue = "31767")] + #[stable(feature = "extended_compare_and_swap", since = "1.10.0")] pub fn compare_exchange(&self, current: *mut T, new: *mut T, @@ -693,7 +690,6 @@ impl<T> AtomicPtr<T> { /// # Examples /// /// ``` - /// # #![feature(extended_compare_and_swap)] /// use std::sync::atomic::{AtomicPtr, Ordering}; /// /// let some_ptr = AtomicPtr::new(&mut 5); @@ -708,7 +704,7 @@ impl<T> AtomicPtr<T> { /// } /// ``` #[inline] - #[unstable(feature = "extended_compare_and_swap", reason = "recently added", issue = "31767")] + #[stable(feature = "extended_compare_and_swap", since = "1.10.0")] pub fn compare_exchange_weak(&self, current: *mut T, new: *mut T, @@ -901,7 +897,6 @@ macro_rules! atomic_int { /// # Examples /// /// ``` - /// # #![feature(extended_compare_and_swap)] /// use std::sync::atomic::{AtomicIsize, Ordering}; /// /// let some_isize = AtomicIsize::new(5); @@ -945,7 +940,6 @@ macro_rules! atomic_int { /// # Examples /// /// ``` - /// # #![feature(extended_compare_and_swap)] /// use std::sync::atomic::{AtomicIsize, Ordering}; /// /// let val = AtomicIsize::new(4); @@ -1115,14 +1109,14 @@ atomic_int! { #[cfg(any(stage0, target_has_atomic = "ptr"))] atomic_int!{ stable(feature = "rust1", since = "1.0.0"), - unstable(feature = "extended_compare_and_swap", reason = "recently added", issue = "31767"), + stable(feature = "extended_compare_and_swap", since = "1.10.0"), stable(feature = "atomic_debug", since = "1.3.0"), isize AtomicIsize ATOMIC_ISIZE_INIT } #[cfg(any(stage0, target_has_atomic = "ptr"))] atomic_int!{ stable(feature = "rust1", since = "1.0.0"), - unstable(feature = "extended_compare_and_swap", reason = "recently added", issue = "31767"), + stable(feature = "extended_compare_and_swap", since = "1.10.0"), stable(feature = "atomic_debug", since = "1.3.0"), usize AtomicUsize ATOMIC_USIZE_INIT } |
