diff options
| author | bors <bors@rust-lang.org> | 2015-09-13 19:45:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-09-13 19:45:15 +0000 |
| commit | cedbd998a4669e026b2a1b34de95d91cd0fde1a5 (patch) | |
| tree | c201a78235b82e78e92cd4f5b51d7022ffddfea6 /src/libcore | |
| parent | c494cf1d01befbc85247a4bb82c3d15cadcfedeb (diff) | |
| parent | f0b1326dc79e186f89b65336ae85f3a8ac6db4c1 (diff) | |
| download | rust-cedbd998a4669e026b2a1b34de95d91cd0fde1a5.tar.gz rust-cedbd998a4669e026b2a1b34de95d91cd0fde1a5.zip | |
Auto merge of #28339 - alexcrichton:stabilize-1.4, r=aturon
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/option.rs | 4 | ||||
| -rw-r--r-- | src/libcore/result.rs | 7 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 4 | ||||
| -rw-r--r-- | src/libcore/str/mod.rs | 4 |
4 files changed, 11 insertions, 8 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 1434617badd..a539ef81db8 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -289,6 +289,7 @@ impl<T> Option<T> { #[unstable(feature = "as_slice", reason = "waiting for mut conventions", issue = "27776")] + #[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")] pub fn as_mut_slice(&mut self) -> &mut [T] { match *self { Some(ref mut x) => { @@ -690,8 +691,9 @@ impl<T> Option<T> { /// Converts from `Option<T>` to `&[T]` (without copying) #[inline] - #[unstable(feature = "as_slice", since = "unsure of the utility here", + #[unstable(feature = "as_slice", reason = "unsure of the utility here", issue = "27776")] + #[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")] pub fn as_slice(&self) -> &[T] { match *self { Some(ref x) => slice::ref_slice(x), diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 2546d9cd63d..e9a67196751 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -405,8 +405,9 @@ impl<T, E> Result<T, E> { /// Converts from `Result<T, E>` to `&[T]` (without copying) #[inline] - #[unstable(feature = "as_slice", since = "unsure of the utility here", + #[unstable(feature = "as_slice", reason = "unsure of the utility here", issue = "27776")] + #[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")] pub fn as_slice(&self) -> &[T] { match *self { Ok(ref x) => slice::ref_slice(x), @@ -439,6 +440,7 @@ impl<T, E> Result<T, E> { #[unstable(feature = "as_slice", reason = "waiting for mut conventions", issue = "27776")] + #[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")] pub fn as_mut_slice(&mut self) -> &mut [T] { match *self { Ok(ref mut x) => slice::mut_ref_slice(x), @@ -742,12 +744,11 @@ impl<T, E: fmt::Debug> Result<T, E> { /// /// # Examples /// ```{.should_panic} - /// #![feature(result_expect)] /// let x: Result<u32, &str> = Err("emergency failure"); /// x.expect("Testing expect"); // panics with `Testing expect: emergency failure` /// ``` #[inline] - #[unstable(feature = "result_expect", reason = "newly introduced", issue = "27277")] + #[stable(feature = "result_expect", since = "1.4.0")] pub fn expect(self, msg: &str) -> T { match self { Ok(t) => t, diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index b5d3129d268..8d3d798afef 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -800,7 +800,7 @@ impl<'a, T> Iter<'a, T> { /// /// This has the same lifetime as the original slice, and so the /// iterator can continue to be used while this exists. - #[unstable(feature = "iter_to_slice", issue = "27775")] + #[stable(feature = "iter_to_slice", since = "1.4.0")] pub fn as_slice(&self) -> &'a [T] { make_slice!(self.ptr, self.end) } @@ -848,7 +848,7 @@ impl<'a, T> IterMut<'a, T> { /// to consume the iterator. Consider using the `Slice` and /// `SliceMut` implementations for obtaining slices with more /// restricted lifetimes that do not consume the iterator. - #[unstable(feature = "iter_to_slice", issue = "27775")] + #[stable(feature = "iter_to_slice", since = "1.4.0")] pub fn into_slice(self) -> &'a mut [T] { make_mut_slice!(self.ptr, self.end) } diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 139f589e6c5..69ebcb1ab7e 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -297,7 +297,7 @@ impl<'a> Chars<'a> { /// /// This has the same lifetime as the original slice, and so the /// iterator can continue to be used while this exists. - #[unstable(feature = "iter_to_slice", issue = "27775")] + #[stable(feature = "iter_to_slice", since = "1.4.0")] #[inline] pub fn as_str(&self) -> &'a str { unsafe { from_utf8_unchecked(self.iter.as_slice()) } @@ -356,7 +356,7 @@ impl<'a> CharIndices<'a> { /// /// This has the same lifetime as the original slice, and so the /// iterator can continue to be used while this exists. - #[unstable(feature = "iter_to_slice", issue = "27775")] + #[stable(feature = "iter_to_slice", since = "1.4.0")] #[inline] pub fn as_str(&self) -> &'a str { self.iter.as_str() |
