Make UnsafeCell::get_mut
const
This commit is contained in:
parent
385f8e2078
commit
efeb461873
1 changed files with 2 additions and 1 deletions
|
@ -1916,7 +1916,8 @@ impl<T: ?Sized> UnsafeCell<T> {
|
|||
/// ```
|
||||
#[inline(always)]
|
||||
#[stable(feature = "unsafe_cell_get_mut", since = "1.50.0")]
|
||||
pub fn get_mut(&mut self) -> &mut T {
|
||||
#[rustc_const_unstable(feature = "const_unsafecell_get_mut", issue = "none")]
|
||||
pub const fn get_mut(&mut self) -> &mut T {
|
||||
&mut self.value
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue