Skip to content

Commit 03d4569

Browse files
committedMay 12, 2022
Fill-in tracking issues for features pointer_byte_offsets, const_pointer_byte_offsets and pointer_is_aligned
1 parent 5a5d62a commit 03d4569

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed
 

‎library/core/src/ptr/const_ptr.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,8 @@ impl<T: ?Sized> *const T {
467467
/// leaving the metadata untouched.
468468
#[must_use]
469469
#[inline(always)]
470-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
471-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
470+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
471+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
472472
pub const unsafe fn byte_offset(self, count: isize) -> Self {
473473
// SAFETY: the caller must uphold the safety contract for `offset`.
474474
let this = unsafe { self.cast::<u8>().offset(count).cast::<()>() };
@@ -549,8 +549,8 @@ impl<T: ?Sized> *const T {
549549
/// leaving the metadata untouched.
550550
#[must_use]
551551
#[inline(always)]
552-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
553-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
552+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
553+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
554554
pub const fn wrapping_byte_offset(self, count: isize) -> Self {
555555
from_raw_parts::<T>(self.cast::<u8>().wrapping_offset(count).cast::<()>(), metadata(self))
556556
}
@@ -659,8 +659,8 @@ impl<T: ?Sized> *const T {
659659
/// For non-`Sized` pointees this operation considers only the data pointers,
660660
/// ignoring the metadata.
661661
#[inline(always)]
662-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
663-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
662+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
663+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
664664
pub const unsafe fn byte_offset_from(self, origin: *const T) -> isize {
665665
// SAFETY: the caller must uphold the safety contract for `offset_from`.
666666
unsafe { self.cast::<u8>().offset_from(origin.cast::<u8>()) }
@@ -880,8 +880,8 @@ impl<T: ?Sized> *const T {
880880
/// leaving the metadata untouched.
881881
#[must_use]
882882
#[inline(always)]
883-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
884-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
883+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
884+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
885885
pub const unsafe fn byte_add(self, count: usize) -> Self {
886886
// SAFETY: the caller must uphold the safety contract for `add`.
887887
let this = unsafe { self.cast::<u8>().add(count).cast::<()>() };
@@ -965,8 +965,8 @@ impl<T: ?Sized> *const T {
965965
/// leaving the metadata untouched.
966966
#[must_use]
967967
#[inline(always)]
968-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
969-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
968+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
969+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
970970
pub const unsafe fn byte_sub(self, count: usize) -> Self {
971971
// SAFETY: the caller must uphold the safety contract for `sub`.
972972
let this = unsafe { self.cast::<u8>().sub(count).cast::<()>() };
@@ -1047,8 +1047,8 @@ impl<T: ?Sized> *const T {
10471047
/// leaving the metadata untouched.
10481048
#[must_use]
10491049
#[inline(always)]
1050-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
1051-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
1050+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
1051+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
10521052
pub const fn wrapping_byte_add(self, count: usize) -> Self {
10531053
from_raw_parts::<T>(self.cast::<u8>().wrapping_add(count).cast::<()>(), metadata(self))
10541054
}
@@ -1127,8 +1127,8 @@ impl<T: ?Sized> *const T {
11271127
/// leaving the metadata untouched.
11281128
#[must_use]
11291129
#[inline(always)]
1130-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
1131-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
1130+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
1131+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
11321132
pub const fn wrapping_byte_sub(self, count: usize) -> Self {
11331133
from_raw_parts::<T>(self.cast::<u8>().wrapping_sub(count).cast::<()>(), metadata(self))
11341134
}
@@ -1296,7 +1296,7 @@ impl<T: ?Sized> *const T {
12961296
/// Returns whether the pointer is properly aligned for `T`.
12971297
#[must_use]
12981298
#[inline]
1299-
#[unstable(feature = "pointer_is_aligned", issue = "none")]
1299+
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
13001300
pub fn is_aligned(self) -> bool
13011301
where
13021302
T: Sized,
@@ -1314,7 +1314,7 @@ impl<T: ?Sized> *const T {
13141314
/// The function panics if `align` is not a power-of-two (this includes 0).
13151315
#[must_use]
13161316
#[inline]
1317-
#[unstable(feature = "pointer_is_aligned", issue = "none")]
1317+
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
13181318
pub fn is_aligned_to(self, align: usize) -> bool {
13191319
if !align.is_power_of_two() {
13201320
panic!("is_aligned_to: align is not a power-of-two");

‎library/core/src/ptr/mut_ptr.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ impl<T: ?Sized> *mut T {
479479
/// leaving the metadata untouched.
480480
#[must_use]
481481
#[inline(always)]
482-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
483-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
482+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
483+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
484484
pub const unsafe fn byte_offset(self, count: isize) -> Self {
485485
// SAFETY: the caller must uphold the safety contract for `offset`.
486486
let this = unsafe { self.cast::<u8>().offset(count).cast::<()>() };
@@ -560,8 +560,8 @@ impl<T: ?Sized> *mut T {
560560
/// leaving the metadata untouched.
561561
#[must_use]
562562
#[inline(always)]
563-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
564-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
563+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
564+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
565565
pub const fn wrapping_byte_offset(self, count: isize) -> Self {
566566
from_raw_parts_mut::<T>(
567567
self.cast::<u8>().wrapping_offset(count).cast::<()>(),
@@ -838,8 +838,8 @@ impl<T: ?Sized> *mut T {
838838
/// For non-`Sized` pointees this operation considers only the data pointers,
839839
/// ignoring the metadata.
840840
#[inline(always)]
841-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
842-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
841+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
842+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
843843
pub const unsafe fn byte_offset_from(self, origin: *const T) -> isize {
844844
// SAFETY: the caller must uphold the safety contract for `offset_from`.
845845
unsafe { self.cast::<u8>().offset_from(origin.cast::<u8>()) }
@@ -992,8 +992,8 @@ impl<T: ?Sized> *mut T {
992992
/// leaving the metadata untouched.
993993
#[must_use]
994994
#[inline(always)]
995-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
996-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
995+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
996+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
997997
pub const unsafe fn byte_add(self, count: usize) -> Self {
998998
// SAFETY: the caller must uphold the safety contract for `add`.
999999
let this = unsafe { self.cast::<u8>().add(count).cast::<()>() };
@@ -1077,8 +1077,8 @@ impl<T: ?Sized> *mut T {
10771077
/// leaving the metadata untouched.
10781078
#[must_use]
10791079
#[inline(always)]
1080-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
1081-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
1080+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
1081+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
10821082
pub const unsafe fn byte_sub(self, count: usize) -> Self {
10831083
// SAFETY: the caller must uphold the safety contract for `sub`.
10841084
let this = unsafe { self.cast::<u8>().sub(count).cast::<()>() };
@@ -1159,8 +1159,8 @@ impl<T: ?Sized> *mut T {
11591159
/// leaving the metadata untouched.
11601160
#[must_use]
11611161
#[inline(always)]
1162-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
1163-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
1162+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
1163+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
11641164
pub const fn wrapping_byte_add(self, count: usize) -> Self {
11651165
from_raw_parts_mut::<T>(self.cast::<u8>().wrapping_add(count).cast::<()>(), metadata(self))
11661166
}
@@ -1239,8 +1239,8 @@ impl<T: ?Sized> *mut T {
12391239
/// leaving the metadata untouched.
12401240
#[must_use]
12411241
#[inline(always)]
1242-
#[unstable(feature = "pointer_byte_offsets", issue = "none")]
1243-
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "none")]
1242+
#[unstable(feature = "pointer_byte_offsets", issue = "96283")]
1243+
#[rustc_const_unstable(feature = "const_pointer_byte_offsets", issue = "96283")]
12441244
pub const fn wrapping_byte_sub(self, count: usize) -> Self {
12451245
from_raw_parts_mut::<T>(self.cast::<u8>().wrapping_sub(count).cast::<()>(), metadata(self))
12461246
}
@@ -1565,7 +1565,7 @@ impl<T: ?Sized> *mut T {
15651565
/// Returns whether the pointer is properly aligned for `T`.
15661566
#[must_use]
15671567
#[inline]
1568-
#[unstable(feature = "pointer_is_aligned", issue = "none")]
1568+
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
15691569
pub fn is_aligned(self) -> bool
15701570
where
15711571
T: Sized,
@@ -1583,7 +1583,7 @@ impl<T: ?Sized> *mut T {
15831583
/// The function panics if `align` is not a power-of-two (this includes 0).
15841584
#[must_use]
15851585
#[inline]
1586-
#[unstable(feature = "pointer_is_aligned", issue = "none")]
1586+
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
15871587
pub fn is_aligned_to(self, align: usize) -> bool {
15881588
if !align.is_power_of_two() {
15891589
panic!("is_aligned_to: align is not a power-of-two");

0 commit comments

Comments
 (0)
Please sign in to comment.