Rollup merge of #88722 - WaffleLapkin:unsafe_cell_const_get_mut, r=dtolnay
Make `UnsafeCell::get_mut` const
This commit is contained in:
commit
5eb77838ea
@ -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 = "88836")]
|
||||
pub const fn get_mut(&mut self) -> &mut T {
|
||||
&mut self.value
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user