Bump const_ptr_offset stabilization to 1.61
This commit is contained in:
parent
022756f814
commit
333756f1c5
@ -1168,7 +1168,7 @@ extern "rust-intrinsic" {
|
||||
///
|
||||
/// The stabilized version of this intrinsic is [`pointer::offset`].
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
pub fn offset<T>(dst: *const T, offset: isize) -> *const T;
|
||||
|
||||
/// Calculates the offset from a pointer, potentially wrapping.
|
||||
@ -1185,7 +1185,7 @@ extern "rust-intrinsic" {
|
||||
///
|
||||
/// The stabilized version of this intrinsic is [`pointer::wrapping_offset`].
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
pub fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
|
||||
|
||||
/// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with
|
||||
|
@ -285,7 +285,7 @@ impl<T: ?Sized> *const T {
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn offset(self, count: isize) -> *const T
|
||||
where
|
||||
@ -347,7 +347,7 @@ impl<T: ?Sized> *const T {
|
||||
/// ```
|
||||
#[stable(feature = "ptr_wrapping_offset", since = "1.16.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const fn wrapping_offset(self, count: isize) -> *const T
|
||||
where
|
||||
@ -566,7 +566,7 @@ impl<T: ?Sized> *const T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn add(self, count: usize) -> Self
|
||||
where
|
||||
@ -630,7 +630,7 @@ impl<T: ?Sized> *const T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline]
|
||||
pub const unsafe fn sub(self, count: usize) -> Self
|
||||
where
|
||||
@ -693,7 +693,7 @@ impl<T: ?Sized> *const T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const fn wrapping_add(self, count: usize) -> Self
|
||||
where
|
||||
@ -755,7 +755,7 @@ impl<T: ?Sized> *const T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline]
|
||||
pub const fn wrapping_sub(self, count: usize) -> Self
|
||||
where
|
||||
|
@ -295,7 +295,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn offset(self, count: isize) -> *mut T
|
||||
where
|
||||
@ -358,7 +358,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// ```
|
||||
#[stable(feature = "ptr_wrapping_offset", since = "1.16.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const fn wrapping_offset(self, count: isize) -> *mut T
|
||||
where
|
||||
@ -680,7 +680,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn add(self, count: usize) -> Self
|
||||
where
|
||||
@ -744,7 +744,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline]
|
||||
pub const unsafe fn sub(self, count: usize) -> Self
|
||||
where
|
||||
@ -807,7 +807,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline(always)]
|
||||
pub const fn wrapping_add(self, count: usize) -> Self
|
||||
where
|
||||
@ -869,7 +869,7 @@ impl<T: ?Sized> *mut T {
|
||||
/// ```
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[must_use = "returns a new pointer rather than modifying its argument"]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline]
|
||||
pub const fn wrapping_sub(self, count: usize) -> Self
|
||||
where
|
||||
|
@ -499,7 +499,7 @@ impl<T> [T] {
|
||||
/// assert_eq!(x, &[3, 4, 6]);
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_mut_refs)]
|
||||
#[inline]
|
||||
#[must_use]
|
||||
@ -536,7 +536,7 @@ impl<T> [T] {
|
||||
///
|
||||
/// [`as_ptr`]: slice::as_ptr
|
||||
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub const fn as_ptr_range(&self) -> Range<*const T> {
|
||||
@ -579,7 +579,7 @@ impl<T> [T] {
|
||||
///
|
||||
/// [`as_mut_ptr`]: slice::as_mut_ptr
|
||||
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
|
||||
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
|
||||
#[rustc_allow_const_fn_unstable(const_mut_refs)]
|
||||
#[inline]
|
||||
#[must_use]
|
||||
|
Loading…
x
Reference in New Issue
Block a user