-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
std: Stabilize APIs for the 1.9 release #32804
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
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
|
r? @brson |
src/libcore/ptr.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.
-> "close to C11's definition of volatile". Extra "what" and "is".
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.
or "end up similar to C11's..."
|
r=me w/ feedback |
26b2482 to
ba2589c
Compare
|
@bors: r=brson ba2589c4d4eed8b867fd7a12b4e13ed558776c91 |
src/compiletest/compiletest.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.
not sure it matters, but you could probably use just one iterator here rather than 3.
ditto on L464
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.
Perhaps yeah, but this is pretty brittle and has no tests, so I'd rather not tamper with it too much.
|
ba2589c to
0d18015
Compare
|
@bors: r=brson 0d180150edaea0390b19e22b726094f6cf0c0351 |
|
⌛ Testing commit 0d18015 with merge df79da8... |
|
💔 Test failed - auto-win-msvc-64-opt |
rustc: x86_64-pc-windows-msvc/stage0/lib/rustlib/x86_64-pc-windows-msvc/lib/libstd
../src/libstd\sys/windows\ext\thread.rs:19:1: 23:2 error: This node does not have a stability attribute
../src/libstd\sys/windows\ext\thread.rs:19 impl<T> AsRawHandle for thread::JoinHandle<T> {
../src/libstd\sys/windows\ext\thread.rs:20 fn as_raw_handle(&self) -> RawHandle {
../src/libstd\sys/windows\ext\thread.rs:21 self.as_inner().handle().raw() as *mut _
../src/libstd\sys/windows\ext\thread.rs:22 }
../src/libstd\sys/windows\ext\thread.rs:23 }
../src/libstd\sys/windows\ext\thread.rs:25:1: 29:2 error: This node does not have a stability attribute
../src/libstd\sys/windows\ext\thread.rs:25 impl<T> IntoRawHandle for thread::JoinHandle<T> {
../src/libstd\sys/windows\ext\thread.rs:26 fn into_raw_handle(self) -> RawHandle {
../src/libstd\sys/windows\ext\thread.rs:27 self.into_inner().into_handle().into_raw() as *mut _
../src/libstd\sys/windows\ext\thread.rs:28 }
../src/libstd\sys/windows\ext\thread.rs:29 }
error: aborting due to 2 previous errors |
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes rust-lang#27719 cc rust-lang#27751 (deprecating the `Slice` bits) Closes rust-lang#27754 Closes rust-lang#27780 Closes rust-lang#27809 Closes rust-lang#27811 Closes rust-lang#27830 Closes rust-lang#28050 Closes rust-lang#29453 Closes rust-lang#29791 Closes rust-lang#29935 Closes rust-lang#30014 Closes rust-lang#30752 Closes rust-lang#31262 cc rust-lang#31398 (still need to deal with `before_exec`) Closes rust-lang#31405 Closes rust-lang#31572 Closes rust-lang#31755 Closes rust-lang#31756
0d18015 to
552eda7
Compare
|
These will need to be backported. |
std: Stabilize APIs for the 1.9 release This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
* Remove the deprecated `CharRange` type which was forgotten to be removed awhile back. * Stabilize the `os::$platform::raw::pthread_t` type which was intended to be stabilized as part of rust-lang#32804
std: Fix up stabilization discrepancies * Remove the deprecated `CharRange` type which was forgotten to be removed awhile back. * Stabilize the `os::$platform::raw::pthread_t` type which was intended to be stabilized as part of #32804
This commit applies all stabilizations, renamings, and deprecations that the
library team has decided on for the upcoming 1.9 release. All tracking issues
have gone through a cycle-long "final comment period" and the specific APIs
stabilized/deprecated are:
Stable
std::panicstd::panic::catch_unwind(renamed fromrecover)std::panic::resume_unwind(renamed frompropagate)std::panic::AssertUnwindSafe(renamed fromAssertRecoverSafe)std::panic::UnwindSafe(renamed fromRecoverSafe)str::is_char_boundary<*const T>::as_ref<*mut T>::as_ref<*mut T>::as_mutAsciiExt::make_ascii_uppercaseAsciiExt::make_ascii_lowercasechar::decode_utf16char::DecodeUtf16char::DecodeUtf16Errorchar::DecodeUtf16Error::unpaired_surrogateBTreeSet::takeBTreeSet::replaceBTreeSet::getHashSet::takeHashSet::replaceHashSet::getOsString::with_capacityOsString::clearOsString::capacityOsString::reserveOsString::reserve_exactOsStr::is_emptyOsStr::lenstd::os::unix::threadRawPthreadJoinHandleExtJoinHandleExt::as_pthread_tJoinHandleExt::into_pthread_tHashSet::hasherHashMap::hasherCommandExt::execFile::try_cloneSocketAddr::set_ipSocketAddr::set_portSocketAddrV4::set_ipSocketAddrV4::set_portSocketAddrV6::set_ipSocketAddrV6::set_portSocketAddrV6::set_flowinfoSocketAddrV6::set_scope_id<[T]>::copy_from_sliceptr::read_volatileptr::write_volatile#[deprecated]attributeOpenOptions::create_newDeprecated
std::raw::Slice- use raw parts ofslicemodule insteadstd::raw::Repr- use raw parts ofslicemodule insteadstr::char_range_at- use slicing pluschars()pluslen_utf8str::char_range_at_reverse- use slicing pluschars().rev()pluslen_utf8str::char_at- use slicing pluschars()str::char_at_reverse- use slicing pluschars().rev()str::slice_shift_char- usechars()plusChars::as_strCommandExt::session_leader- usebefore_execinstead.Closes #27719
cc #27751 (deprecating the
Slicebits)Closes #27754
Closes #27780
Closes #27809
Closes #27811
Closes #27830
Closes #28050
Closes #29453
Closes #29791
Closes #29935
Closes #30014
Closes #30752
Closes #31262
cc #31398 (still need to deal with
before_exec)Closes #31405
Closes #31572
Closes #31755
Closes #31756