Closed
Description
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 fn
Public API
This feature makes the following APIs const
:
// 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];
These functions as const
were previously tracked here, but are now stabilized:
// core::array
pub const fn from_ref<T>(s: &T) -> &[T; 1];
// core::slice
pub const fn from_ref<T>(s: &T) -> &[T];
Steps / History
- Implementation: Mark
{array, slice}::{from_ref, from_mut}
as const fn #90162 - Stabilization of
_ref
functions: Stabilize{slice,array}::from_ref
#97366 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.