diff options
| author | Ralf Jung <post@ralfj.de> | 2024-11-30 10:33:09 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-11-30 11:55:58 +0100 |
| commit | 4ce2116aef0677c6f59890d9bd3acea890fa5cbb (patch) | |
| tree | 4d17bc8f429d65deccdeb3191d35a50ef984452a /library/core/src/ptr | |
| parent | 0dc94404ee1c529dcf0071f0ef84f64934e7f747 (diff) | |
| download | rust-4ce2116aef0677c6f59890d9bd3acea890fa5cbb.tar.gz rust-4ce2116aef0677c6f59890d9bd3acea890fa5cbb.zip | |
get rid of a bunch of unnecessary rustc_const_unstable
Diffstat (limited to 'library/core/src/ptr')
| -rw-r--r-- | library/core/src/ptr/const_ptr.rs | 3 | ||||
| -rw-r--r-- | library/core/src/ptr/mut_ptr.rs | 5 | ||||
| -rw-r--r-- | library/core/src/ptr/unique.rs | 1 |
3 files changed, 1 insertions, 8 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 6f6815f49cd..f100adecbbb 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -346,7 +346,6 @@ impl<T: ?Sized> *const T { /// ``` #[inline] #[unstable(feature = "ptr_as_uninit", issue = "75402")] - #[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")] pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>> where T: Sized, @@ -1528,7 +1527,6 @@ impl<T> *const [T] { /// /// If `N` is not exactly equal to the length of `self`, then this method returns `None`. #[unstable(feature = "slice_as_array", issue = "133508")] - #[rustc_const_unstable(feature = "slice_as_array", issue = "133508")] #[inline] #[must_use] pub const fn as_array<const N: usize>(self) -> Option<*const [T; N]> { @@ -1608,7 +1606,6 @@ impl<T> *const [T] { /// [allocated object]: crate::ptr#allocated-object #[inline] #[unstable(feature = "ptr_as_uninit", issue = "75402")] - #[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")] pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> { if self.is_null() { None diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 678c6029158..6d0361b8c63 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -342,7 +342,6 @@ impl<T: ?Sized> *mut T { /// ``` #[inline] #[unstable(feature = "ptr_as_uninit", issue = "75402")] - #[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")] pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>> where T: Sized, @@ -676,7 +675,6 @@ impl<T: ?Sized> *mut T { /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion). #[inline] #[unstable(feature = "ptr_as_uninit", issue = "75402")] - #[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")] pub const unsafe fn as_uninit_mut<'a>(self) -> Option<&'a mut MaybeUninit<T>> where T: Sized, @@ -1762,7 +1760,6 @@ impl<T> *mut [T] { /// /// If `N` is not exactly equal to the length of `self`, then this method returns `None`. #[unstable(feature = "slice_as_array", issue = "133508")] - #[rustc_const_unstable(feature = "slice_as_array", issue = "133508")] #[inline] #[must_use] pub const fn as_mut_array<const N: usize>(self) -> Option<*mut [T; N]> { @@ -1963,7 +1960,6 @@ impl<T> *mut [T] { /// [allocated object]: crate::ptr#allocated-object #[inline] #[unstable(feature = "ptr_as_uninit", issue = "75402")] - #[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")] pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> { if self.is_null() { None @@ -2015,7 +2011,6 @@ impl<T> *mut [T] { /// [allocated object]: crate::ptr#allocated-object #[inline] #[unstable(feature = "ptr_as_uninit", issue = "75402")] - #[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")] pub const unsafe fn as_uninit_slice_mut<'a>(self) -> Option<&'a mut [MaybeUninit<T>]> { if self.is_null() { None diff --git a/library/core/src/ptr/unique.rs b/library/core/src/ptr/unique.rs index a796820a7e4..ebdc918a729 100644 --- a/library/core/src/ptr/unique.rs +++ b/library/core/src/ptr/unique.rs @@ -92,6 +92,7 @@ impl<T: ?Sized> Unique<T> { /// Creates a new `Unique` if `ptr` is non-null. #[inline] + // rustc_const_unstable attribute can be removed when `const_nonnull_new` is stable #[rustc_const_unstable(feature = "ptr_internals", issue = "none")] pub const fn new(ptr: *mut T) -> Option<Self> { if let Some(pointer) = NonNull::new(ptr) { |
