about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-08 10:15:31 +0000
committerbors <bors@rust-lang.org>2019-06-08 10:15:31 +0000
commitfb7cca33f861b47738d232a91e3655f1f9b1a421 (patch)
tree5b6a87f35c5f8a6e6ca888d93ebdd7026cde965c /src
parent7f90abe3aa1864e40e3d516b936c4a1a84e72aee (diff)
parent2ce94403688c938bdc857fb498ab756cbe72ada7 (diff)
downloadrust-fb7cca33f861b47738d232a91e3655f1f9b1a421.tar.gz
rust-fb7cca33f861b47738d232a91e3655f1f9b1a421.zip
Auto merge of #61620 - SimonSapin:as_cell, r=RalfJung
Stabilize Cell::from_mut and as_slice_of_cells

FCP: https://github.com/rust-lang/rust/issues/43038#issuecomment-499900463
Diffstat (limited to 'src')
-rw-r--r--src/libcore/cell.rs6
-rw-r--r--src/test/run-pass/rfcs/rfc-1789-as-cell/from-mut.rs1
2 files changed, 2 insertions, 5 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 239ff017cc2..beafddc5a10 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -494,7 +494,6 @@ impl<T: ?Sized> Cell<T> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(as_cell)]
     /// use std::cell::Cell;
     ///
     /// let slice: &mut [i32] = &mut [1, 2, 3];
@@ -504,7 +503,7 @@ impl<T: ?Sized> Cell<T> {
     /// 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<T> {
         unsafe {
             &*(t as *mut T as *const Cell<T>)
@@ -541,7 +540,6 @@ impl<T> Cell<[T]> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(as_cell)]
     /// use std::cell::Cell;
     ///
     /// let slice: &mut [i32] = &mut [1, 2, 3];
@@ -550,7 +548,7 @@ impl<T> 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<T>] {
         unsafe {
             &*(self as *const Cell<[T]> as *const [Cell<T>])
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 f275c67fdf0..ea3ad7aed49 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;