Skip to content

Commit 28a27e4

Browse files
committed
stabilize the intrinsic
1 parent e8709f1 commit 28a27e4

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

Diff for: library/core/src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,7 @@ pub const unsafe fn ptr_offset_from<T>(_ptr: *const T, _base: *const T) -> isize
36753675
#[rustc_nounwind]
36763676
#[rustc_intrinsic]
36773677
#[rustc_intrinsic_must_be_overridden]
3678+
#[rustc_intrinsic_const_stable_indirect]
36783679
pub const unsafe fn ptr_offset_from_unsigned<T>(_ptr: *const T, _base: *const T) -> usize {
36793680
unimplemented!()
36803681
}

Diff for: library/core/src/ptr/const_ptr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,6 @@ impl<T: ?Sized> *const T {
766766
/// ```
767767
#[stable(feature = "ptr_sub_ptr", since = "CURRENT_RUSTC_VERSION")]
768768
#[rustc_const_stable(feature = "const_ptr_sub_ptr", since = "CURRENT_RUSTC_VERSION")]
769-
#[rustc_allow_const_fn_unstable(core_intrinsics)]
770769
#[inline]
771770
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
772771
pub const unsafe fn sub_ptr(self, origin: *const T) -> usize

0 commit comments

Comments
 (0)