File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2115,7 +2115,6 @@ impl<T: ?Sized> UnsafeCell<T> {
2115
2115
/// # Examples
2116
2116
///
2117
2117
/// ```
2118
- /// # #![feature(unsafe_cell_from_mut)]
2119
2118
/// use std::cell::UnsafeCell;
2120
2119
///
2121
2120
/// let mut val = 42;
@@ -2125,7 +2124,9 @@ impl<T: ?Sized> UnsafeCell<T> {
2125
2124
/// assert_eq!(*uc.get_mut(), 41);
2126
2125
/// ```
2127
2126
#[ inline( always) ]
2128
- #[ unstable( feature = "unsafe_cell_from_mut" , issue = "111645" ) ]
2127
+ #[ stable( feature = "unsafe_cell_from_mut" , since = "CURRENT_RUSTC_VERSION" ) ]
2128
+ #[ rustc_const_stable( feature = "unsafe_cell_from_mut" , since = "CURRENT_RUSTC_VERSION" ) ]
2129
+ #[ cfg_attr( bootstrap, rustc_allow_const_fn_unstable( const_mut_refs) ) ]
2129
2130
pub const fn from_mut ( value : & mut T ) -> & mut UnsafeCell < T > {
2130
2131
// SAFETY: `UnsafeCell<T>` has the same memory layout as `T` due to #[repr(transparent)].
2131
2132
unsafe { & mut * ( value as * mut T as * mut UnsafeCell < T > ) }
You can’t perform that action at this time.
0 commit comments