Stabilize const_ptr_offset_from.

Stabilization has been completed [here](https://github.com/rust-lang/rust/issues/92980#issuecomment-1065644848)
with a FCP.
This commit is contained in:
Deadbeef 2022-04-20 14:42:18 +10:00
parent 5462da52ba
commit ad93272627
8 changed files with 4 additions and 9 deletions

View file

@ -824,7 +824,7 @@ impl<T: ?Sized> *mut T {
/// }
/// ```
#[stable(feature = "ptr_offset_from", since = "1.47.0")]
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "92980")]
#[rustc_const_stable(feature = "const_ptr_offset_from", since = "1.65.0")]
#[inline(always)]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn offset_from(self, origin: *const T) -> isize