Skip to content

std: Stabilize APIs for the 1.9 release - #32804

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:stabilize-1.9
Apr 12, 2016
Merged

std: Stabilize APIs for the 1.9 release#32804
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:stabilize-1.9

Conversation

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
Contributor

r? @aturon

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

@alexcrichton

Copy link
Copy Markdown
MemberAuthor

r? @brson

@rust-highfiverust-highfive assigned brson and unassigned aturonApr 7, 2016
@brsonbrson added the relnotes Marks issues that should be documented in the release notes of the next release. label Apr 7, 2016
Comment threadsrc/libcore/ptr.rs Outdated

Copy link
Copy Markdown
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
Copy Markdown
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

brson commented Apr 7, 2016

Copy link
Copy Markdown
Contributor

r=me w/ feedback

@alexcrichton

Copy link
Copy Markdown
MemberAuthor

@bors: r=brson ba2589c4d4eed8b867fd7a12b4e13ed558776c91

Comment threadsrc/compiletest/compiletest.rs Outdated

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
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
Copy Markdown
MemberAuthor

@bors: r=brson 0d180150edaea0390b19e22b726094f6cf0c0351

@bors

bors commented Apr 9, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 0d18015 with merge df79da8...

@bors

bors commented Apr 9, 2016

Copy link
Copy Markdown
Collaborator

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

@bluss

Copy link
Copy Markdown
Contributor
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:19impl<T>AsRawHandlefor thread::JoinHandle<T>{
../src/libstd\sys/windows\ext\thread.rs:20fnas_raw_handle(&self) -> RawHandle{
../src/libstd\sys/windows\ext\thread.rs:21self.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:25impl<T>IntoRawHandlefor thread::JoinHandle<T>{
../src/libstd\sys/windows\ext\thread.rs:26fninto_raw_handle(self) -> RawHandle{
../src/libstd\sys/windows\ext\thread.rs:27self.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 2previous 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.
Closesrust-lang#27719
cc rust-lang#27751 (deprecating the `Slice` bits)
Closesrust-lang#27754Closesrust-lang#27780Closesrust-lang#27809Closesrust-lang#27811Closesrust-lang#27830Closesrust-lang#28050Closesrust-lang#29453Closesrust-lang#29791Closesrust-lang#29935Closesrust-lang#30014Closesrust-lang#30752Closesrust-lang#31262
cc rust-lang#31398 (still need to deal with `before_exec`)
Closesrust-lang#31405Closesrust-lang#31572Closesrust-lang#31755Closesrust-lang#31756
@alexcrichton

Copy link
Copy Markdown
MemberAuthor

@bors: r=brson 552eda7

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

Copy link
Copy Markdown
Contributor

These will need to be backported.

@bors

bors commented Apr 12, 2016

Copy link
Copy Markdown
Collaborator

⌛ 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#27754Closes#27780Closes#27809Closes#27811Closes#27830Closes#28050Closes#29453Closes#29791Closes#29935Closes#30014Closes#30752Closes#31262
cc #31398 (still need to deal with `before_exec`)
Closes#31405Closes#31572Closes#31755Closes#31756
@bors
bors merged commit 552eda7 into rust-lang:masterApr 12, 2016
@alexcrichtonalexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 12, 2016
@brsonbrson 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.relnotesMarks 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

@alexcrichton@rust-highfive@brson@Manishearth@bors@bluss@tamird@aturon