-
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
Tracking Issue for {array, slice}::{from_ref, from_mut}
as const fn
#90206
Comments
@rfcbot fcp merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Note that cc @oli-obk |
Tracking issue for |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
cc @rust-lang/wg-const-eval |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
…from_ref, r=dtolnay Stabilize `{slice,array}::from_ref` This PR stabilizes the following APIs as `const` functions in Rust `1.63`: ```rust // core::array pub const fn from_ref<T>(s: &T) -> &[T; 1]; // core::slice pub const fn from_ref<T>(s: &T) -> &[T]; ``` Note that the `mut` versions are not stabilized as unique references (`&mut _`) are [unstable in const context]. FCP: rust-lang#90206 (comment) r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs [unstable in const context]: rust-lang#57349
… r=dtolnay Stabilize `{slice,array}::from_ref` This PR stabilizes the following APIs as `const` functions in Rust `1.63`: ```rust // core::array pub const fn from_ref<T>(s: &T) -> &[T; 1]; // core::slice pub const fn from_ref<T>(s: &T) -> &[T]; ``` Note that the `mut` versions are not stabilized as unique references (`&mut _`) are [unstable in const context]. FCP: rust-lang/rust#90206 (comment) r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs [unstable in const context]: rust-lang/rust#57349
This still tracks |
FCP for |
…r=workingjubilee Stabilize const `{slice,array}::from_mut` This PR stabilizes the following APIs as const stable as of rust `1.83`: ```rs // core::array pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1]; // core::slice pub const fn from_mut<T>(s: &mut T) -> &mut [T]; ``` This is made possible by `const_mut_refs` being stabilized (yay). Tracking issue: rust-lang#90206
…, r=workingjubilee Stabilize const `{slice,array}::from_mut` This PR stabilizes the following APIs as const stable as of rust `1.83`: ```rs // core::array pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1]; // core::slice pub const fn from_mut<T>(s: &mut T) -> &mut [T]; ``` This is made possible by `const_mut_refs` being stabilized (yay). Tracking issue: rust-lang#90206
…, r=workingjubilee Stabilize const `{slice,array}::from_mut` This PR stabilizes the following APIs as const stable as of rust `1.83`: ```rs // core::array pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1]; // core::slice pub const fn from_mut<T>(s: &mut T) -> &mut [T]; ``` This is made possible by `const_mut_refs` being stabilized (yay). Tracking issue: rust-lang#90206
Rollup merge of rust-lang#130538 - ultrabear:ultrabear_const_from_ref, r=workingjubilee Stabilize const `{slice,array}::from_mut` This PR stabilizes the following APIs as const stable as of rust `1.83`: ```rs // core::array pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1]; // core::slice pub const fn from_mut<T>(s: &mut T) -> &mut [T]; ``` This is made possible by `const_mut_refs` being stabilized (yay). Tracking issue: rust-lang#90206
Feature gates:
#![feature(const_array_from_ref)]
and#![feature(const_slice_from_ref)]
This is a tracking issue for
{array, slice}::{from_ref, from_mut}
functions marked as const fnPublic API
This feature makes the following APIs
const
:These functions as
const
were previously tracked here, but are now stabilized:Steps / History
{array, slice}::{from_ref, from_mut}
as const fn #90162_ref
functions: Stabilize{slice,array}::from_ref
#97366Unresolved Questions
The text was updated successfully, but these errors were encountered: