-
Notifications
You must be signed in to change notification settings - Fork 14k
std: Stabilize APIs for the 1.7 release #30943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
r? @aturon Note that this PR currently leaves out the stabilization of custom hashers in hashmaps because there's a bit of a question of where the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we disambiguate this RFC from our normal RFCs? Do we want to provide a link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah I think that if you're reading this much into the documentation you'll probably recognize in the context that these are the other kind of RFCs. That being said if it ends up being confusing we can certainly update!
|
OK, r=me unless you want to deal with the tiny nit. |
61ea7ba to
faded1c
Compare
|
@bors: r=aturon faded1c375f55e35f849e003b40e6bab30eb3e66 |
|
oh also, cc @rust-lang/libs |
|
It looks like |
|
@bors: r- Oh that was originally left out because it always overflowed (e.g. always returned |
faded1c to
317592f
Compare
src/libcore/num/mod.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-self?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, yes ideed!
317592f to
19d4a21
Compare
|
@bors: r=aturon 19d4a21 |
|
⌛ Testing commit 19d4a21 with merge 0246765... |
|
💔 Test failed - auto-linux-64-x-android-t |
19d4a21 to
f2e517b
Compare
|
@bors: r=aturon f2e517b |
This commit stabilizes and deprecates the FCP (final comment period) APIs for
the upcoming 1.7 beta release. The specific APIs which changed were:
Stabilized
* `Path::strip_prefix` (renamed from `relative_from`)
* `path::StripPrefixError` (new error type returned from `strip_prefix`)
* `Ipv4Addr::is_loopback`
* `Ipv4Addr::is_private`
* `Ipv4Addr::is_link_local`
* `Ipv4Addr::is_multicast`
* `Ipv4Addr::is_broadcast`
* `Ipv4Addr::is_documentation`
* `Ipv6Addr::is_unspecified`
* `Ipv6Addr::is_loopback`
* `Ipv6Addr::is_unique_local`
* `Ipv6Addr::is_multicast`
* `Vec::as_slice`
* `Vec::as_mut_slice`
* `String::as_str`
* `String::as_mut_str`
* `<[T]>::clone_from_slice` - the `usize` return value is removed
* `<[T]>::sort_by_key`
* `i32::checked_rem` (and other signed types)
* `i32::checked_neg` (and other signed types)
* `i32::checked_shl` (and other signed types)
* `i32::checked_shr` (and other signed types)
* `i32::saturating_mul` (and other signed types)
* `i32::overflowing_add` (and other signed types)
* `i32::overflowing_sub` (and other signed types)
* `i32::overflowing_mul` (and other signed types)
* `i32::overflowing_div` (and other signed types)
* `i32::overflowing_rem` (and other signed types)
* `i32::overflowing_neg` (and other signed types)
* `i32::overflowing_shl` (and other signed types)
* `i32::overflowing_shr` (and other signed types)
* `u32::checked_rem` (and other unsigned types)
* `u32::checked_neg` (and other unsigned types)
* `u32::checked_shl` (and other unsigned types)
* `u32::saturating_mul` (and other unsigned types)
* `u32::overflowing_add` (and other unsigned types)
* `u32::overflowing_sub` (and other unsigned types)
* `u32::overflowing_mul` (and other unsigned types)
* `u32::overflowing_div` (and other unsigned types)
* `u32::overflowing_rem` (and other unsigned types)
* `u32::overflowing_neg` (and other unsigned types)
* `u32::overflowing_shl` (and other unsigned types)
* `u32::overflowing_shr` (and other unsigned types)
* `ffi::IntoStringError`
* `CString::into_string`
* `CString::into_bytes`
* `CString::into_bytes_with_nul`
* `From<CString> for Vec<u8>`
* `From<CString> for Vec<u8>`
* `IntoStringError::into_cstring`
* `IntoStringError::utf8_error`
* `Error for IntoStringError`
Deprecated
* `Path::relative_from` - renamed to `strip_prefix`
* `Path::prefix` - use `components().next()` instead
* `os::unix::fs` constants - moved to the `libc` crate
* `fmt::{radix, Radix, RadixFmt}` - not used enough to stabilize
* `IntoCow` - conflicts with `Into` and may come back later
* `i32::{BITS, BYTES}` (and other integers) - not pulling their weight
* `DebugTuple::formatter` - will be removed
* `sync::Semaphore` - not used enough and confused with system semaphores
Closes rust-lang#23284
cc rust-lang#27709 (still lots more methods though)
Closes rust-lang#27712
Closes rust-lang#27722
Closes rust-lang#27728
Closes rust-lang#27735
Closes rust-lang#27729
Closes rust-lang#27755
Closes rust-lang#27782
Closes rust-lang#27798
f2e517b to
9a4f43b
Compare
This commit stabilizes and deprecates the FCP (final comment period) APIs for
the upcoming 1.7 beta release. The specific APIs which changed were:
Stabilized
* `Path::strip_prefix` (renamed from `relative_from`)
* `path::StripPrefixError` (new error type returned from `strip_prefix`)
* `Ipv4Addr::is_loopback`
* `Ipv4Addr::is_private`
* `Ipv4Addr::is_link_local`
* `Ipv4Addr::is_multicast`
* `Ipv4Addr::is_broadcast`
* `Ipv4Addr::is_documentation`
* `Ipv6Addr::is_unspecified`
* `Ipv6Addr::is_loopback`
* `Ipv6Addr::is_unique_local`
* `Ipv6Addr::is_multicast`
* `Vec::as_slice`
* `Vec::as_mut_slice`
* `String::as_str`
* `String::as_mut_str`
* `<[T]>::clone_from_slice` - the `usize` return value is removed
* `<[T]>::sort_by_key`
* `i32::checked_rem` (and other signed types)
* `i32::checked_neg` (and other signed types)
* `i32::checked_shl` (and other signed types)
* `i32::checked_shr` (and other signed types)
* `i32::saturating_mul` (and other signed types)
* `i32::overflowing_add` (and other signed types)
* `i32::overflowing_sub` (and other signed types)
* `i32::overflowing_mul` (and other signed types)
* `i32::overflowing_div` (and other signed types)
* `i32::overflowing_rem` (and other signed types)
* `i32::overflowing_neg` (and other signed types)
* `i32::overflowing_shl` (and other signed types)
* `i32::overflowing_shr` (and other signed types)
* `u32::checked_rem` (and other unsigned types)
* `u32::checked_shl` (and other unsigned types)
* `u32::saturating_mul` (and other unsigned types)
* `u32::overflowing_add` (and other unsigned types)
* `u32::overflowing_sub` (and other unsigned types)
* `u32::overflowing_mul` (and other unsigned types)
* `u32::overflowing_div` (and other unsigned types)
* `u32::overflowing_rem` (and other unsigned types)
* `u32::overflowing_neg` (and other unsigned types)
* `u32::overflowing_shl` (and other unsigned types)
* `u32::overflowing_shr` (and other unsigned types)
* `ffi::IntoStringError`
* `CString::into_string`
* `CString::into_bytes`
* `CString::into_bytes_with_nul`
* `From<CString> for Vec<u8>`
* `From<CString> for Vec<u8>`
* `IntoStringError::into_cstring`
* `IntoStringError::utf8_error`
* `Error for IntoStringError`
Deprecated
* `Path::relative_from` - renamed to `strip_prefix`
* `Path::prefix` - use `components().next()` instead
* `os::unix::fs` constants - moved to the `libc` crate
* `fmt::{radix, Radix, RadixFmt}` - not used enough to stabilize
* `IntoCow` - conflicts with `Into` and may come back later
* `i32::{BITS, BYTES}` (and other integers) - not pulling their weight
* `DebugTuple::formatter` - will be removed
* `sync::Semaphore` - not used enough and confused with system semaphores
Closes rust-lang#23284
cc rust-lang#27709 (still lots more methods though)
Closes rust-lang#27712
Closes rust-lang#27722
Closes rust-lang#27728
Closes rust-lang#27735
Closes rust-lang#27729
Closes rust-lang#27755
Closes rust-lang#27782
Closes rust-lang#27798
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, major perf regression. I'll try to PR this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh gah good eye!
(for those following along the PR was submitted)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's fine. I'm not worried, as long as it gets into the same beta release.
|
Now I understand why the clone_from_slice fix got a p=1. I'm not even sure that's a good idea. |
This commit stabilizes and deprecates the FCP (final comment period) APIs for
the upcoming 1.7 beta release. The specific APIs which changed were:
Stabilized
Path::strip_prefix(renamed fromrelative_from)path::StripPrefixError(new error type returned fromstrip_prefix)Ipv4Addr::is_loopbackIpv4Addr::is_privateIpv4Addr::is_link_localIpv4Addr::is_multicastIpv4Addr::is_broadcastIpv4Addr::is_documentationIpv6Addr::is_unspecifiedIpv6Addr::is_loopbackIpv6Addr::is_unique_localIpv6Addr::is_multicastVec::as_sliceVec::as_mut_sliceString::as_strString::as_mut_str<[T]>::clone_from_slice- theusizereturn value is removed<[T]>::sort_by_keyi32::checked_rem(and other signed types)i32::checked_neg(and other signed types)i32::checked_shl(and other signed types)i32::checked_shr(and other signed types)i32::saturating_mul(and other signed types)i32::overflowing_add(and other signed types)i32::overflowing_sub(and other signed types)i32::overflowing_mul(and other signed types)i32::overflowing_div(and other signed types)i32::overflowing_rem(and other signed types)i32::overflowing_neg(and other signed types)i32::overflowing_shl(and other signed types)i32::overflowing_shr(and other signed types)u32::checked_rem(and other unsigned types)u32::checked_shl(and other unsigned types)u32::saturating_mul(and other unsigned types)u32::overflowing_add(and other unsigned types)u32::overflowing_sub(and other unsigned types)u32::overflowing_mul(and other unsigned types)u32::overflowing_div(and other unsigned types)u32::overflowing_rem(and other unsigned types)u32::overflowing_neg(and other unsigned types)u32::overflowing_shl(and other unsigned types)u32::overflowing_shr(and other unsigned types)ffi::IntoStringErrorCString::into_stringCString::into_bytesCString::into_bytes_with_nulFrom<CString> for Vec<u8>From<CString> for Vec<u8>IntoStringError::into_cstringIntoStringError::utf8_errorError for IntoStringErrorDeprecated
Path::relative_from- renamed tostrip_prefixPath::prefix- usecomponents().next()insteados::unix::fsconstants - moved to thelibccratefmt::{radix, Radix, RadixFmt}- not used enough to stabilizeIntoCow- conflicts withIntoand may come back lateri32::{BITS, BYTES}(and other integers) - not pulling their weightDebugTuple::formatter- will be removedsync::Semaphore- not used enough and confused with system semaphoresCloses #23284
cc #27709 (still lots more methods though)
Closes #27712
Closes #27722
Closes #27728
Closes #27735
Closes #27729
Closes #27755
Closes #27782
Closes #27798