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

Stabilize more APIs for the 1.20.0 release #43373

Merged
merged 8 commits into from
Jul 27, 2017

Conversation

alexcrichton
Copy link
Member

In addition to the few stabilizations that have already landed, this cleans up the remaining APIs that are in final-comment-period right now to be stable by the 1.20.0 release

@alexcrichton alexcrichton added beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jul 20, 2017
@alexcrichton
Copy link
Member Author

Note that I've explicitly omitted RangeArgument as I believe there's still activity happening on that.

@alexcrichton
Copy link
Member Author

r? @aturon

@alexcrichton
Copy link
Member Author

(or @sfackler)

@@ -445,6 +444,8 @@ declare_features! (
// Allows the definition of associated constants in `trait` or `impl`
// blocks.
(accepted, associated_consts, "1.20.0", Some(29646)),
// Usage of the `compile_error!` macro
(accepted, compile_error, "1.20.0", Some(40872)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[00:04:22] error[E0026]: struct `feature_gate::Features` does not have a field named `compile_error`
[00:04:22]     --> /checkout/src/libsyntax/ext/expand.rs:1044:35
[00:04:22]      |
[00:04:22] 1013 | |                      Some(&Features { $field: true, .. }) => true,
[00:04:22]      | |__________________________________________________^ struct `feature_gate::Features` does not have field `compile_error`
[00:04:22] ...
[00:04:22] 1034 | |/     feature_tests! {
[00:04:22] 1035 | ||         fn enable_quotes = quote,
[00:04:22] 1036 | ||         fn enable_asm = asm,
[00:04:22] 1037 | ||         fn enable_global_asm = global_asm,
[00:04:22] ...    ||
[00:04:22] 1044 |  |         fn enable_compile_error = compile_error,
[00:04:22]      |  |___________________________________^
[00:04:22] 1045 |  |     }
[00:04:22]      |  |_____- in this macro invocation
[00:04:22] 
[00:04:22] error: aborting due to previous error(s)
[00:04:22] 
[00:04:22] error: Could not compile `syntax`.

@alexcrichton alexcrichton force-pushed the stabilize-1.20.0 branch 2 times, most recently from 79866b6 to b8ce384 Compare July 21, 2017 15:22
@shepmaster shepmaster added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 21, 2017
@bors
Copy link
Contributor

bors commented Jul 22, 2017

☔ The latest upstream changes (presumably #43367) made this pull request unmergeable. Please resolve the merge conflicts.

@aturon
Copy link
Member

aturon commented Jul 25, 2017

LGTM. Fire at will.

@kennytm
Copy link
Member

kennytm commented Jul 25, 2017

libstd doc tests failed.

[01:04:15] ---- ffi/c_str.rs - ffi::c_str::CStr::into_c_string (line 1003) stdout ----
[01:04:15] 	error: this feature has been stable since 1.20.0. Attribute no longer needed
[01:04:15]  --> <anon>:1:12
[01:04:15]   |
[01:04:15] 1 | #![feature(into_boxed_c_str)]
[01:04:15]   |            ^^^^^^^^^^^^^^^^
[01:04:15]   |
...
[01:04:15] failures:
[01:04:15]     ffi/c_str.rs - ffi::c_str::CStr::into_c_string (line 1003)
[01:04:15]     ffi/c_str.rs - ffi::c_str::CString::as_c_str (line 455)
[01:04:15]     ffi/c_str.rs - ffi::c_str::CString::into_boxed_c_str (line 476)
[01:04:15]     ffi/os_str.rs - ffi::os_str::OsString::into_boxed_os_str (line 254)

Stabilizes:

* `<char>::escape_debug`
* `std::char::EscapeDebug`

Closes rust-lang#35068
Stabilized:

* `Option::get_or_insert`
* `Option::get_or_insert_with`

Closes rust-lang#39288
Stabilized

* `<str>::get`
* `<str>::get_mut`
* `<str>::get_unchecked`
* `<str>::get_unchecked_mut`

Closes rust-lang#39932
Stabilizes:

* `CString::as_c_str`
* `CString::into_boxed_c_str`
* `CStr::into_c_string`
* `OsString::into_boxed_os_str`
* `OsStr::into_os_string`
* `PathBuf::into_boxed_path`
* `PathBuf::into_path_buf`

Closes rust-lang#40380
Stabilizes:

* `Utf8Error::error_len`

Closes rust-lang#40494
Stabilizes

* `core::mem::ManuallyDrop`
* `std::mem::ManuallyDrop`
* `ManuallyDrop::new`
* `ManuallyDrop::into_inner`
* `ManuallyDrop::drop`
* `Deref for ManuallyDrop`
* `DerefMut for ManuallyDrop`

Closes rust-lang#40673
Stabilizes:

* `compile_error!` as a macro defined by rustc

Closes rust-lang#40872
Stabilizes

* `<&mut str>::as_bytes_mut`
* `<Box<str>>::into_boxed_bytes`
* `std::str::from_boxed_utf8_unchecked`
* `std::str::from_utf8_mut`
* `std::str::from_utf8_unchecked_mut`

Closes rust-lang#41119
@alexcrichton
Copy link
Member Author

@bors: r=aturon

@bors
Copy link
Contributor

bors commented Jul 25, 2017

📌 Commit 16707d4 has been approved by aturon

@bors
Copy link
Contributor

bors commented Jul 26, 2017

⌛ Testing commit 16707d4 with merge de2eadaa672db502230b61325cd3afaa57fc2a59...

@bors
Copy link
Contributor

bors commented Jul 26, 2017

💔 Test failed - status-travis

@kennytm
Copy link
Member

kennytm commented Jul 26, 2017

x86_64-gnu-aux, #43453, spurious.

@Mark-Simulacrum
Copy link
Member

@bors retry - #43453 RLS tests

@bors
Copy link
Contributor

bors commented Jul 26, 2017

⌛ Testing commit 16707d4 with merge ddaab61...

bors added a commit that referenced this pull request Jul 26, 2017
Stabilize more APIs for the 1.20.0 release

In addition to the few stabilizations that have already landed, this cleans up the remaining APIs that are in `final-comment-period` right now to be stable by the 1.20.0 release
@bors
Copy link
Contributor

bors commented Jul 27, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: aturon
Pushing ddaab61 to master...

@bors bors merged commit 16707d4 into rust-lang:master Jul 27, 2017
@bors bors mentioned this pull request Jul 27, 2017
7 tasks
@XAMPPRocky
Copy link
Member

@alexcrichton What does mean for impl SliceIndex<str> for Range* being stable when the SliceIndex trait is still unstable?

@alexcrichton alexcrichton deleted the stabilize-1.20.0 branch August 5, 2017 03:19
@alexcrichton
Copy link
Member Author

@Aaronepower oh that's actually mostly irrelevant in terms of stabilization, the real stabilization here is methods like str::get that consume these impls.

@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 12, 2017
bors added a commit that referenced this pull request Aug 13, 2017
Backporting accepted PRs to beta

Backport of:

* #43735
* #43546
* #43513
* #43373
* #43315
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jan 4, 2018
Correct a few stability attributes

* The extra impls for `ManuallyDrop` were added in rust-lang#44310 which was only stabilised in 1.22.0.
* The impls for `SliceIndex` were stabilised in rust-lang#43373 but as `RangeInclusive` and `RangeToInclusive` are still unstable the impls should remain unstable.
* The `From` impls for atomic integers were added in rust-lang#45610 but most atomic integers are still unstable.
* The `shared_from_slice2` impls were added in rust-lang#45990 but they won't be stable until 1.24.0.
* The `Mutex` and `RwLock` impls were added in rust-lang#46082 but won't be stable until 1.24.0.
kennytm added a commit to kennytm/rust that referenced this pull request Jan 4, 2018
Correct a few stability attributes

* The extra impls for `ManuallyDrop` were added in rust-lang#44310 which was only stabilised in 1.22.0.
* The impls for `SliceIndex` were stabilised in rust-lang#43373 but as `RangeInclusive` and `RangeToInclusive` are still unstable the impls should remain unstable.
* The `From` impls for atomic integers were added in rust-lang#45610 but most atomic integers are still unstable.
* The `shared_from_slice2` impls were added in rust-lang#45990 but they won't be stable until 1.24.0.
* The `Mutex` and `RwLock` impls were added in rust-lang#46082 but won't be stable until 1.24.0.
kennytm added a commit to kennytm/rust that referenced this pull request Jan 5, 2018
Correct a few stability attributes

* The extra impls for `ManuallyDrop` were added in rust-lang#44310 which was only stabilised in 1.22.0.
* The impls for `SliceIndex` were stabilised in rust-lang#43373 but as `RangeInclusive` and `RangeToInclusive` are still unstable the impls should remain unstable.
* The `From` impls for atomic integers were added in rust-lang#45610 but most atomic integers are still unstable.
* The `shared_from_slice2` impls were added in rust-lang#45990 but they won't be stable until 1.24.0.
* The `Mutex` and `RwLock` impls were added in rust-lang#46082 but won't be stable until 1.24.0.
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. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants