diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-04-21 20:57:48 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-05-12 12:54:21 +0400 |
| commit | 03d45699390421d6a27f5ae2dc10077b38d950fe (patch) | |
| tree | ceb4f30d741da5ea4543ebc5d10108b3d01dd589 | |
| parent | 5a5d62aeb2a7be83bff34d6f4db4e1bbe7bd5a93 (diff) | |
| download | rust-03d45699390421d6a27f5ae2dc10077b38d950fe.tar.gz rust-03d45699390421d6a27f5ae2dc10077b38d950fe.zip | |
Fill-in tracking issues for features pointer_byte_offsets, const_pointer_byte_offsets and pointer_is_aligned
| -rw-r--r-- | library/core/src/ptr/const_ptr.rs | 32 | ||||
| -rw-r--r-- | 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 824b3fad6c3..f26fdc74ce1 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -467,8 +467,8 @@ impl<T: ?Sized> *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::<u8>().offset(count).cast::<()>() }; @@ -549,8 +549,8 @@ impl<T: ?Sized> *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::<T>(self.cast::<u8>().wrapping_offset(count).cast::<()>(), metadata(self)) } @@ -659,8 +659,8 @@ impl<T: ?Sized> *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::<u8>().offset_from(origin.cast::<u8>()) } @@ -880,8 +880,8 @@ impl<T: ?Sized> *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::<u8>().add(count).cast::<()>() }; @@ -965,8 +965,8 @@ impl<T: ?Sized> *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::<u8>().sub(count).cast::<()>() }; @@ -1047,8 +1047,8 @@ impl<T: ?Sized> *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::<T>(self.cast::<u8>().wrapping_add(count).cast::<()>(), metadata(self)) } @@ -1127,8 +1127,8 @@ impl<T: ?Sized> *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::<T>(self.cast::<u8>().wrapping_sub(count).cast::<()>(), metadata(self)) } @@ -1296,7 +1296,7 @@ impl<T: ?Sized> *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<T: ?Sized> *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 4613262dad9..37cf2ef4bfb 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -479,8 +479,8 @@ impl<T: ?Sized> *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::<u8>().offset(count).cast::<()>() }; @@ -560,8 +560,8 @@ impl<T: ?Sized> *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::<T>( self.cast::<u8>().wrapping_offset(count).cast::<()>(), @@ -838,8 +838,8 @@ impl<T: ?Sized> *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::<u8>().offset_from(origin.cast::<u8>()) } @@ -992,8 +992,8 @@ impl<T: ?Sized> *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::<u8>().add(count).cast::<()>() }; @@ -1077,8 +1077,8 @@ impl<T: ?Sized> *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::<u8>().sub(count).cast::<()>() }; @@ -1159,8 +1159,8 @@ impl<T: ?Sized> *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::<T>(self.cast::<u8>().wrapping_add(count).cast::<()>(), metadata(self)) } @@ -1239,8 +1239,8 @@ impl<T: ?Sized> *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::<T>(self.cast::<u8>().wrapping_sub(count).cast::<()>(), metadata(self)) } @@ -1565,7 +1565,7 @@ impl<T: ?Sized> *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<T: ?Sized> *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"); |
