diff options
Diffstat (limited to 'src/libcore/ptr.rs')
| -rw-r--r-- | src/libcore/ptr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 01990f61fee..0e8b5df85a9 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -74,7 +74,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_null"))] +#[rustc_const_unstable(feature = "const_ptr_null")] pub const fn null<T>() -> *const T { 0 as *const T } /// Creates a null mutable raw pointer. @@ -89,7 +89,7 @@ pub const fn null<T>() -> *const T { 0 as *const T } /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_null_mut"))] +#[rustc_const_unstable(feature = "const_ptr_null_mut")] pub const fn null_mut<T>() -> *mut T { 0 as *mut T } /// Swaps the values at two mutable locations of the same type, without @@ -2333,7 +2333,7 @@ impl<T: ?Sized> Unique<T> { /// /// `ptr` must be non-null. #[unstable(feature = "unique", issue = "27730")] - #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unique_new"))] + #[rustc_const_unstable(feature = "const_unique_new")] pub const unsafe fn new_unchecked(ptr: *mut T) -> Self { Unique { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData } } @@ -2468,7 +2468,7 @@ impl<T: ?Sized> Shared<T> { /// /// `ptr` must be non-null. #[unstable(feature = "shared", issue = "27730")] - #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_shared_new"))] + #[rustc_const_unstable(feature = "const_shared_new")] pub const unsafe fn new_unchecked(ptr: *mut T) -> Self { Shared { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData } } |
