diff options
Diffstat (limited to 'src/libcore/nonzero.rs')
| -rw-r--r-- | src/libcore/nonzero.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index f075d825f5d..2c966eb3b57 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -28,8 +28,7 @@ macro_rules! impl_zeroable_for_pointer_types { unsafe impl<T: ?Sized> Zeroable for $Ptr { #[inline] fn is_zero(&self) -> bool { - // Cast because `is_null` is only available on thin pointers - (*self as *mut u8).is_null() + (*self).is_null() } } )+ @@ -71,7 +70,6 @@ impl<T: Zeroable> NonZero<T> { #[unstable(feature = "nonzero", reason = "needs an RFC to flesh out the design", issue = "27730")] - #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_nonzero_new"))] #[inline] pub const unsafe fn new_unchecked(inner: T) -> Self { NonZero(inner) |
