bump bootstrap; adjust stage0 uses in core::ptr.

This commit is contained in:
Mazdak Farrokhzad 2019-03-26 09:57:25 +01:00
parent 750983d356
commit 0b46f0e649

View File

@ -2913,7 +2913,7 @@ impl<T: Sized> NonNull<T> {
/// some other means.
#[stable(feature = "nonnull", since = "1.25.0")]
#[inline]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_nonnull"))]
#[rustc_const_unstable(feature = "const_ptr_nonnull")]
pub const fn dangling() -> Self {
unsafe {
let ptr = mem::align_of::<T>() as *mut T;
@ -2977,7 +2977,7 @@ impl<T: ?Sized> NonNull<T> {
/// Cast to a pointer of another type
#[stable(feature = "nonnull_cast", since = "1.27.0")]
#[inline]
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_nonnull"))]
#[rustc_const_unstable(feature = "const_ptr_nonnull")]
pub const fn cast<U>(self) -> NonNull<U> {
unsafe {
NonNull::new_unchecked(self.as_ptr() as *mut U)