From 03d45699390421d6a27f5ae2dc10077b38d950fe Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 21 Apr 2022 20:57:48 +0400 Subject: [PATCH] Fill-in tracking issues for features pointer_byte_offsets, const_pointer_byte_offsets and pointer_is_aligned --- library/core/src/ptr/const_ptr.rs | 32 +++++++++++++++---------------- library/core/src/ptr/mut_ptr.rs | 32 +++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 824b3fad6c39b..f26fdc74ce161 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -467,8 +467,8 @@ impl *const T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_offset(self, count: isize) -> Self { // SAFETY: the caller must uphold the safety contract for `offset`. let this = unsafe { self.cast::().offset(count).cast::<()>() }; @@ -549,8 +549,8 @@ impl *const T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const fn wrapping_byte_offset(self, count: isize) -> Self { from_raw_parts::(self.cast::().wrapping_offset(count).cast::<()>(), metadata(self)) } @@ -659,8 +659,8 @@ impl *const T { /// For non-`Sized` pointees this operation considers only the data pointers, /// ignoring the metadata. #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_offset_from(self, origin: *const T) -> isize { // SAFETY: the caller must uphold the safety contract for `offset_from`. unsafe { self.cast::().offset_from(origin.cast::()) } @@ -880,8 +880,8 @@ impl *const T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_add(self, count: usize) -> Self { // SAFETY: the caller must uphold the safety contract for `add`. let this = unsafe { self.cast::().add(count).cast::<()>() }; @@ -965,8 +965,8 @@ impl *const T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_sub(self, count: usize) -> Self { // SAFETY: the caller must uphold the safety contract for `sub`. let this = unsafe { self.cast::().sub(count).cast::<()>() }; @@ -1047,8 +1047,8 @@ impl *const T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const fn wrapping_byte_add(self, count: usize) -> Self { from_raw_parts::(self.cast::().wrapping_add(count).cast::<()>(), metadata(self)) } @@ -1127,8 +1127,8 @@ impl *const T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const fn wrapping_byte_sub(self, count: usize) -> Self { from_raw_parts::(self.cast::().wrapping_sub(count).cast::<()>(), metadata(self)) } @@ -1296,7 +1296,7 @@ impl *const T { /// Returns whether the pointer is properly aligned for `T`. #[must_use] #[inline] - #[unstable(feature = "pointer_is_aligned", issue = "none")] + #[unstable(feature = "pointer_is_aligned", issue = "96284")] pub fn is_aligned(self) -> bool where T: Sized, @@ -1314,7 +1314,7 @@ impl *const T { /// The function panics if `align` is not a power-of-two (this includes 0). #[must_use] #[inline] - #[unstable(feature = "pointer_is_aligned", issue = "none")] + #[unstable(feature = "pointer_is_aligned", issue = "96284")] pub fn is_aligned_to(self, align: usize) -> bool { if !align.is_power_of_two() { panic!("is_aligned_to: align is not a power-of-two"); diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 4613262dad9c5..37cf2ef4bfbb5 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -479,8 +479,8 @@ impl *mut T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_offset(self, count: isize) -> Self { // SAFETY: the caller must uphold the safety contract for `offset`. let this = unsafe { self.cast::().offset(count).cast::<()>() }; @@ -560,8 +560,8 @@ impl *mut T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const fn wrapping_byte_offset(self, count: isize) -> Self { from_raw_parts_mut::( self.cast::().wrapping_offset(count).cast::<()>(), @@ -838,8 +838,8 @@ impl *mut T { /// For non-`Sized` pointees this operation considers only the data pointers, /// ignoring the metadata. #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_offset_from(self, origin: *const T) -> isize { // SAFETY: the caller must uphold the safety contract for `offset_from`. unsafe { self.cast::().offset_from(origin.cast::()) } @@ -992,8 +992,8 @@ impl *mut T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_add(self, count: usize) -> Self { // SAFETY: the caller must uphold the safety contract for `add`. let this = unsafe { self.cast::().add(count).cast::<()>() }; @@ -1077,8 +1077,8 @@ impl *mut T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const unsafe fn byte_sub(self, count: usize) -> Self { // SAFETY: the caller must uphold the safety contract for `sub`. let this = unsafe { self.cast::().sub(count).cast::<()>() }; @@ -1159,8 +1159,8 @@ impl *mut T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const fn wrapping_byte_add(self, count: usize) -> Self { from_raw_parts_mut::(self.cast::().wrapping_add(count).cast::<()>(), metadata(self)) } @@ -1239,8 +1239,8 @@ impl *mut T { /// leaving the metadata untouched. #[must_use] #[inline(always)] - #[unstable(feature = "pointer_byte_offsets", issue = "none")] - #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")] + #[unstable(feature = "pointer_byte_offsets", issue = "96283")] + #[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")] pub const fn wrapping_byte_sub(self, count: usize) -> Self { from_raw_parts_mut::(self.cast::().wrapping_sub(count).cast::<()>(), metadata(self)) } @@ -1565,7 +1565,7 @@ impl *mut T { /// Returns whether the pointer is properly aligned for `T`. #[must_use] #[inline] - #[unstable(feature = "pointer_is_aligned", issue = "none")] + #[unstable(feature = "pointer_is_aligned", issue = "96284")] pub fn is_aligned(self) -> bool where T: Sized, @@ -1583,7 +1583,7 @@ impl *mut T { /// The function panics if `align` is not a power-of-two (this includes 0). #[must_use] #[inline] - #[unstable(feature = "pointer_is_aligned", issue = "none")] + #[unstable(feature = "pointer_is_aligned", issue = "96284")] pub fn is_aligned_to(self, align: usize) -> bool { if !align.is_power_of_two() { panic!("is_aligned_to: align is not a power-of-two");