Stabilize unsafe_cell_get_mut

This commit is contained in:
Ellen 2020-11-28 00:30:26 +00:00
parent 774bce7f5e
commit 9db1f42fa2
2 changed files with 1 additions and 4 deletions

View file

@ -1618,7 +1618,6 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
/// implies exclusive access to its `T`: /// implies exclusive access to its `T`:
/// ///
/// ```rust /// ```rust
/// #![feature(unsafe_cell_get_mut)]
/// #![forbid(unsafe_code)] // with exclusive accesses, /// #![forbid(unsafe_code)] // with exclusive accesses,
/// // `UnsafeCell` is a transparent no-op wrapper, /// // `UnsafeCell` is a transparent no-op wrapper,
/// // so no need for `unsafe` here. /// // so no need for `unsafe` here.
@ -1722,7 +1721,6 @@ impl<T: ?Sized> UnsafeCell<T> {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// #![feature(unsafe_cell_get_mut)]
/// use std::cell::UnsafeCell; /// use std::cell::UnsafeCell;
/// ///
/// let mut c = UnsafeCell::new(5); /// let mut c = UnsafeCell::new(5);
@ -1731,7 +1729,7 @@ impl<T: ?Sized> UnsafeCell<T> {
/// assert_eq!(*c.get_mut(), 6); /// assert_eq!(*c.get_mut(), 6);
/// ``` /// ```
#[inline] #[inline]
#[unstable(feature = "unsafe_cell_get_mut", issue = "76943")] #[stable(feature = "unsafe_cell_get_mut", since = "1.50.0")]
pub fn get_mut(&mut self) -> &mut T { pub fn get_mut(&mut self) -> &mut T {
&mut self.value &mut self.value
} }

View file

@ -320,7 +320,6 @@
#![feature(try_reserve)] #![feature(try_reserve)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
#![feature(unsafe_block_in_unsafe_fn)] #![feature(unsafe_block_in_unsafe_fn)]
#![feature(unsafe_cell_get_mut)]
#![feature(unsafe_cell_raw_get)] #![feature(unsafe_cell_raw_get)]
#![feature(unwind_attributes)] #![feature(unwind_attributes)]
#![feature(vec_into_raw_parts)] #![feature(vec_into_raw_parts)]