Skip to content

Commit e31bb45

Browse files
committed
stabilize const_cell
1 parent 81d8edc commit e31bb45

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/core/src/cell.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ impl<T> Cell<T> {
495495
/// ```
496496
#[inline]
497497
#[stable(feature = "move_cell", since = "1.17.0")]
498-
#[rustc_const_unstable(feature = "const_cell", issue = "131283")]
498+
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
499499
#[rustc_confusables("swap")]
500500
pub const fn replace(&self, val: T) -> T {
501501
// SAFETY: This can cause data races if called from a separate thread,
@@ -537,7 +537,7 @@ impl<T: Copy> Cell<T> {
537537
/// ```
538538
#[inline]
539539
#[stable(feature = "rust1", since = "1.0.0")]
540-
#[rustc_const_unstable(feature = "const_cell", issue = "131283")]
540+
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
541541
pub const fn get(&self) -> T {
542542
// SAFETY: This can cause data races if called from a separate thread,
543543
// but `Cell` is `!Sync` so this won't happen.
@@ -617,7 +617,7 @@ impl<T: ?Sized> Cell<T> {
617617
/// ```
618618
#[inline]
619619
#[stable(feature = "cell_get_mut", since = "1.11.0")]
620-
#[rustc_const_unstable(feature = "const_cell", issue = "131283")]
620+
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
621621
pub const fn get_mut(&mut self) -> &mut T {
622622
self.value.get_mut()
623623
}
@@ -637,7 +637,7 @@ impl<T: ?Sized> Cell<T> {
637637
/// ```
638638
#[inline]
639639
#[stable(feature = "as_cell", since = "1.37.0")]
640-
#[rustc_const_unstable(feature = "const_cell", issue = "131283")]
640+
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
641641
pub const fn from_mut(t: &mut T) -> &Cell<T> {
642642
// SAFETY: `&mut` ensures unique access.
643643
unsafe { &*(t as *mut T as *const Cell<T>) }
@@ -695,7 +695,7 @@ impl<T> Cell<[T]> {
695695
/// assert_eq!(slice_cell.len(), 3);
696696
/// ```
697697
#[stable(feature = "as_cell", since = "1.37.0")]
698-
#[rustc_const_unstable(feature = "const_cell", issue = "131283")]
698+
#[rustc_const_stable(feature = "const_cell", since = "CURRENT_RUSTC_VERSION")]
699699
pub const fn as_slice_of_cells(&self) -> &[Cell<T>] {
700700
// SAFETY: `Cell<T>` has the same memory layout as `T`.
701701
unsafe { &*(self as *const Cell<[T]> as *const [Cell<T>]) }

0 commit comments

Comments
 (0)