-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
std: Stabilize APIs for the 1.9 release #32804
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
r? @brson |
/// Rust does not currently have a rigorously and formally defined memory model, | ||
/// so the precise semantics of what "volatile" means here is subject to change | ||
/// over time. That being said, the semantics will almost always end up pretty | ||
/// close to what [C11's definition of volatile is][c11]. |
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 |
if pos + 2 >= full_version_line.len() { | ||
continue | ||
} | ||
if full_version_line[pos + 1..].chars().next().unwrap() != '.' { |
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::panic
std::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_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
#[deprecated]
attributeOpenOptions::create_new
Deprecated
std::raw::Slice
- use raw parts ofslice
module insteadstd::raw::Repr
- use raw parts ofslice
module insteadstr::char_range_at
- use slicing pluschars()
pluslen_utf8
str::char_range_at_reverse
- use slicing pluschars().rev()
pluslen_utf8
str::char_at
- use slicing pluschars()
str::char_at_reverse
- use slicing pluschars().rev()
str::slice_shift_char
- usechars()
plusChars::as_str
CommandExt::session_leader
- usebefore_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