Skip to content
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

Merged
merged 1 commit into from
Apr 12, 2016

Conversation

alexcrichton
Copy link
Member

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

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @brson

@rust-highfive rust-highfive assigned brson and unassigned aturon Apr 7, 2016
@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Apr 7, 2016
/// 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].
Copy link
Contributor

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".

Copy link
Contributor

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..."

@brson
Copy link
Contributor

brson commented Apr 7, 2016

r=me w/ feedback

@alexcrichton
Copy link
Member Author

@bors: r=brson ba2589c4d4eed8b867fd7a12b4e13ed558776c91

if pos + 2 >= full_version_line.len() {
continue
}
if full_version_line[pos + 1..].chars().next().unwrap() != '.' {
Copy link
Contributor

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

Copy link
Member Author

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.

@Manishearth
Copy link
Member

src/libstd/panic.rs:125:21: 125:32 error: use of deprecated item: renamed to `UnwindSafe`

src/libstd/panic.rs:125 impl<T: UnwindSafe> RecoverSafe for T {}
                                            ^~~~~~~~~~~
src/libstd/lib.rs:283:31: 283:39 note: lint level defined here
src/libstd/lib.rs:283 #![cfg_attr(not(stage0), deny(warnings))]

@alexcrichton
Copy link
Member Author

@bors: r=brson 0d180150edaea0390b19e22b726094f6cf0c0351

@bors
Copy link
Contributor

bors commented Apr 9, 2016

⌛ Testing commit 0d18015 with merge df79da8...

@bors
Copy link
Contributor

bors commented Apr 9, 2016

💔 Test failed - auto-win-msvc-64-opt

@bluss
Copy link
Member

bluss commented Apr 10, 2016

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
@alexcrichton
Copy link
Member Author

@bors: r=brson 552eda7

@brson brson added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 11, 2016
@brson
Copy link
Contributor

brson commented Apr 11, 2016

These will need to be backported.

@bors
Copy link
Contributor

bors commented Apr 12, 2016

⌛ Testing commit 552eda7 with merge bed32d8...

bors added a commit that referenced this pull request Apr 12, 2016
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
@bors bors merged commit 552eda7 into rust-lang:master Apr 12, 2016
@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 12, 2016
@brson brson removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 12, 2016
@alexcrichton alexcrichton deleted the stabilize-1.9 branch April 13, 2016 23:48
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jun 23, 2016
* 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
bors added a commit that referenced this pull request Jun 24, 2016
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants