diff options
| author | kennytm <kennytm@gmail.com> | 2017-11-29 18:37:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-29 18:37:47 +0800 |
| commit | 0e78c29bea998081cb1880da9fa09e38d46d44a6 (patch) | |
| tree | 3b4b2a5a57516705db3d1b752aa9864ef00f4e78 /src/libcore/ptr.rs | |
| parent | 6006c0f35fdcdaa25dfd2cf76438ca2bb5e37d4b (diff) | |
| parent | 6c5f53e65ee5f022611033dbf58c42e26be7f93d (diff) | |
| download | rust-0e78c29bea998081cb1880da9fa09e38d46d44a6.tar.gz rust-0e78c29bea998081cb1880da9fa09e38d46d44a6.zip | |
Rollup merge of #46287 - SimonSapin:stable-constness, r=aturon
Stabilize const-calling existing const-fns in std Fixes #46038
Diffstat (limited to 'src/libcore/ptr.rs')
| -rw-r--r-- | src/libcore/ptr.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 19553d0c37b..5e70c8283f4 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -74,7 +74,6 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[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 +88,6 @@ pub const fn null<T>() -> *const T { 0 as *const T } /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[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 @@ -2347,7 +2345,6 @@ impl<T: ?Sized> Unique<T> { /// /// `ptr` must be non-null. #[unstable(feature = "unique", issue = "27730")] - #[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 } } @@ -2482,7 +2479,6 @@ impl<T: ?Sized> Shared<T> { /// /// `ptr` must be non-null. #[unstable(feature = "shared", issue = "27730")] - #[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 } } |
