diff options
| -rw-r--r-- | library/core/src/cell.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs index 7140218fa91..ef2a5dd570f 100644 --- a/library/core/src/cell.rs +++ b/library/core/src/cell.rs @@ -1733,8 +1733,7 @@ impl<T: ?Sized> UnsafeCell<T> { #[inline] #[unstable(feature = "unsafe_cell_get_mut", issue = "76943")] pub fn get_mut(&mut self) -> &mut T { - // SAFETY: (outer) `&mut` guarantees unique access. - unsafe { &mut *self.get() } + &mut self.value } /// Gets a mutable pointer to the wrapped value. |
