about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Simmons <josh@nega.tv>2025-07-17 09:11:44 +0200
committerJosh Simmons <josh@nega.tv>2025-07-17 09:11:44 +0200
commit14c6e50d4740e13bf36b6c272485804ba9ad9117 (patch)
tree3cbdf5b54157faaed0224559eb0ca4f19aed1eac
parent014bd8290f084c714995205a9116e6c035419ae6 (diff)
downloadrust-14c6e50d4740e13bf36b6c272485804ba9ad9117.tar.gz
rust-14c6e50d4740e13bf36b6c272485804ba9ad9117.zip
Stabilize as_array_of_cells
-rw-r--r--library/core/src/cell.rs4
-rw-r--r--tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs2
2 files changed, 2 insertions, 4 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index d6d1bf2effa..583a3340c26 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -698,14 +698,14 @@ impl<T, const N: usize> Cell<[T; N]> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(as_array_of_cells)]
     /// use std::cell::Cell;
     ///
     /// let mut array: [i32; 3] = [1, 2, 3];
     /// let cell_array: &Cell<[i32; 3]> = Cell::from_mut(&mut array);
     /// let array_cell: &[Cell<i32>; 3] = cell_array.as_array_of_cells();
     /// ```
-    #[unstable(feature = "as_array_of_cells", issue = "88248")]
+    #[stable(feature = "as_array_of_cells", since = "CURRENT_RUSTC_VERSION")]
+    #[rustc_const_stable(feature = "as_array_of_cells", since = "CURRENT_RUSTC_VERSION")]
     pub const fn as_array_of_cells(&self) -> &[Cell<T>; N] {
         // SAFETY: `Cell<T>` has the same memory layout as `T`.
         unsafe { &*(self as *const Cell<[T; N]> as *const [Cell<T>; N]) }
diff --git a/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs b/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs
index d3b441fbe88..700f875a4f6 100644
--- a/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs
+++ b/tests/ui/rfcs/rfc-1789-as-cell/from-mut.rs
@@ -1,7 +1,5 @@
 //@ run-pass
 
-#![feature(as_array_of_cells)]
-
 use std::cell::Cell;
 
 fn main() {