Skip to content

Commit

Permalink
avoid shared ref in UnsafeCell::get
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 16, 2018
1 parent 6b9b97b commit 41434e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/cell.rs
Expand Up @@ -1509,7 +1509,7 @@ impl<T: ?Sized> UnsafeCell<T> {
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn get(&self) -> *mut T {
&self.value as *const T as *mut T
self as *const UnsafeCell<T> as *const T as *mut T
}
}

Expand Down

0 comments on commit 41434e0

Please sign in to comment.