Skip to content

Commit fb7cca3

Browse files
committed
Auto merge of #61620 - SimonSapin:as_cell, r=RalfJung
Stabilize Cell::from_mut and as_slice_of_cells FCP: #43038 (comment)
2 parents 7f90abe + 2ce9440 commit fb7cca3

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/libcore/cell.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ impl<T: ?Sized> Cell<T> {
494494
/// # Examples
495495
///
496496
/// ```
497-
/// #![feature(as_cell)]
498497
/// use std::cell::Cell;
499498
///
500499
/// let slice: &mut [i32] = &mut [1, 2, 3];
@@ -504,7 +503,7 @@ impl<T: ?Sized> Cell<T> {
504503
/// assert_eq!(slice_cell.len(), 3);
505504
/// ```
506505
#[inline]
507-
#[unstable(feature = "as_cell", issue="43038")]
506+
#[stable(feature = "as_cell", since = "1.37.0")]
508507
pub fn from_mut(t: &mut T) -> &Cell<T> {
509508
unsafe {
510509
&*(t as *mut T as *const Cell<T>)
@@ -541,7 +540,6 @@ impl<T> Cell<[T]> {
541540
/// # Examples
542541
///
543542
/// ```
544-
/// #![feature(as_cell)]
545543
/// use std::cell::Cell;
546544
///
547545
/// let slice: &mut [i32] = &mut [1, 2, 3];
@@ -550,7 +548,7 @@ impl<T> Cell<[T]> {
550548
///
551549
/// assert_eq!(slice_cell.len(), 3);
552550
/// ```
553-
#[unstable(feature = "as_cell", issue="43038")]
551+
#[stable(feature = "as_cell", since = "1.37.0")]
554552
pub fn as_slice_of_cells(&self) -> &[Cell<T>] {
555553
unsafe {
556554
&*(self as *const Cell<[T]> as *const [Cell<T>])

src/test/run-pass/rfcs/rfc-1789-as-cell/from-mut.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// run-pass
2-
#![feature(as_cell)]
32

43
use std::cell::Cell;
54

0 commit comments

Comments
 (0)