Rollup merge of #92981 - RalfJung:const_ptr_offset_from, r=dtolnay

fix const_ptr_offset_from tracking issue

The old tracking issue #41079 was for exposing those functions at all, and got closed when they were stabilized. We had nothing tracking their `const`ness so I opened a new tracking issue: https://github.com/rust-lang/rust/issues/92980.
This commit is contained in:
Matthias Krüger 2022-01-17 06:08:19 +01:00 committed by GitHub
commit 9612038a7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -1893,7 +1893,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
pub fn nontemporal_store<T>(ptr: *mut T, val: T);
/// See documentation of `<*const T>::offset_from` for details.
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")]
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "92980")]
pub fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;
/// See documentation of `<*const T>::guaranteed_eq` for details.

View File

@ -439,7 +439,7 @@ pub const fn wrapping_offset(self, count: isize) -> *const T
/// }
/// ```
#[stable(feature = "ptr_offset_from", since = "1.47.0")]
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")]
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "92980")]
#[inline]
pub const unsafe fn offset_from(self, origin: *const T) -> isize
where

View File

@ -617,7 +617,7 @@ pub const fn guaranteed_eq(self, other: *mut T) -> bool
/// }
/// ```
#[stable(feature = "ptr_offset_from", since = "1.47.0")]
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")]
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "92980")]
#[inline(always)]
pub const unsafe fn offset_from(self, origin: *const T) -> isize
where