Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// tidy-alphabetical-start
#![allow(internal_features)]
#![cfg_attr(bootstrap, feature(slice_as_array))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]
Expand All @@ -16,7 +17,6 @@
#![feature(iter_intersperse)]
#![feature(macro_derive)]
#![feature(rustdoc_internals)]
#![feature(slice_as_array)]
#![feature(try_blocks)]
// tidy-alphabetical-end

Expand Down
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
#![feature(ptr_alignment_type)]
#![feature(ptr_metadata)]
#![feature(set_ptr_value)]
#![feature(slice_as_array)]
#![feature(slice_ptr_get)]
#![feature(str_internals)]
#![feature(str_split_inclusive_remainder)]
Expand Down
3 changes: 2 additions & 1 deletion library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,8 @@ impl<T> *const [T] {
/// Gets a raw pointer to the underlying array.
///
/// If `N` is not exactly equal to the length of `self`, then this method returns `None`.
#[unstable(feature = "slice_as_array", issue = "133508")]
#[stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[inline]
#[must_use]
pub const fn as_array<const N: usize>(self) -> Option<*const [T; N]> {
Expand Down
3 changes: 2 additions & 1 deletion library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,8 @@ impl<T> *mut [T] {
/// Gets a raw, mutable pointer to the underlying array.
///
/// If `N` is not exactly equal to the length of `self`, then this method returns `None`.
#[unstable(feature = "slice_as_array", issue = "133508")]
#[stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[inline]
#[must_use]
pub const fn as_mut_array<const N: usize>(self) -> Option<*mut [T; N]> {
Expand Down
6 changes: 4 additions & 2 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,8 @@ impl<T> [T] {
/// Gets a reference to the underlying array.
///
/// If `N` is not exactly equal to the length of `self`, then this method returns `None`.
#[unstable(feature = "slice_as_array", issue = "133508")]
#[stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[inline]
#[must_use]
pub const fn as_array<const N: usize>(&self) -> Option<&[T; N]> {
Expand All @@ -859,7 +860,8 @@ impl<T> [T] {
/// Gets a mutable reference to the slice's underlying array.
///
/// If `N` is not exactly equal to the length of `self`, then this method returns `None`.
#[unstable(feature = "slice_as_array", issue = "133508")]
#[stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "core_slice_as_array", since = "CURRENT_RUSTC_VERSION")]
#[inline]
#[must_use]
pub const fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]> {
Expand Down
Loading