mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-28 23:53:55 +00:00
025cf96615
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: https://github.com/rust-lang/rust/issues/90206#issuecomment-1134586665 r? rust-lang/libs-api `@rustbot` label +T-libs-api -T-libs [unstable in const context]: https://github.com/rust-lang/rust/issues/57349 |
||
---|---|---|
.. | ||
benches | ||
primitive_docs | ||
src | ||
tests | ||
Cargo.toml |