From 2ce94403688c938bdc857fb498ab756cbe72ada7 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 7 Jun 2019 16:25:41 +0200 Subject: [PATCH] Stabilize Cell::from_mut and as_slice_of_cells FCP: https://github.com/rust-lang/rust/issues/43038#issuecomment-499900463 --- src/libcore/cell.rs | 6 ++---- src/test/run-pass/rfcs/rfc-1789-as-cell/from-mut.rs | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 239ff017cc230..beafddc5a1019 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -494,7 +494,6 @@ impl Cell { /// # Examples /// /// ``` - /// #![feature(as_cell)] /// use std::cell::Cell; /// /// let slice: &mut [i32] = &mut [1, 2, 3]; @@ -504,7 +503,7 @@ impl Cell { /// assert_eq!(slice_cell.len(), 3); /// ``` #[inline] - #[unstable(feature = "as_cell", issue="43038")] + #[stable(feature = "as_cell", since = "1.37.0")] pub fn from_mut(t: &mut T) -> &Cell { unsafe { &*(t as *mut T as *const Cell) @@ -541,7 +540,6 @@ impl Cell<[T]> { /// # Examples /// /// ``` - /// #![feature(as_cell)] /// use std::cell::Cell; /// /// let slice: &mut [i32] = &mut [1, 2, 3]; @@ -550,7 +548,7 @@ impl Cell<[T]> { /// /// assert_eq!(slice_cell.len(), 3); /// ``` - #[unstable(feature = "as_cell", issue="43038")] + #[stable(feature = "as_cell", since = "1.37.0")] pub fn as_slice_of_cells(&self) -> &[Cell] { unsafe { &*(self as *const Cell<[T]> as *const [Cell]) diff --git a/src/test/run-pass/rfcs/rfc-1789-as-cell/from-mut.rs b/src/test/run-pass/rfcs/rfc-1789-as-cell/from-mut.rs index f275c67fdf01f..ea3ad7aed4926 100644 --- a/src/test/run-pass/rfcs/rfc-1789-as-cell/from-mut.rs +++ b/src/test/run-pass/rfcs/rfc-1789-as-cell/from-mut.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(as_cell)] use std::cell::Cell;