avoid shared ref in UnsafeCell::get

This commit is contained in:
Ralf Jung 2018-11-16 22:17:26 +01:00
parent 6b9b97bd9b
commit 41434e001b

View File

@ -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
}
}