diff options
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index a408bf8e284..546e4e52699 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -160,7 +160,8 @@ impl<T: Send + Share + Clone> Arc<T> { // reference count is guaranteed to be 1 at this point, and we required // the Arc itself to be `mut`, so we're returning the only possible // reference to the inner data. - unsafe { mem::transmute::<&_, &mut _>(self.deref()) } + let inner = unsafe { &mut *self._ptr }; + &mut inner.data } } |
