Skip to content

Commit 69ad634

Browse files
committed
Do not include const_ptr_sub_ptr in this stabilization
1 parent ad93272 commit 69ad634

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

library/core/src/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,7 @@ extern "rust-intrinsic" {
20172017
pub fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;
20182018

20192019
/// See documentation of `<*const T>::sub_ptr` for details.
2020-
#[rustc_const_stable(feature = "const_ptr_offset_from", since = "1.65.0")]
2020+
#[rustc_const_unstable(feature = "const_ptr_sub_ptr", issue = "95892")]
20212021
pub fn ptr_offset_from_unsigned<T>(ptr: *const T, base: *const T) -> usize;
20222022

20232023
/// See documentation of `<*const T>::guaranteed_eq` for details.

src/test/ui/consts/offset_from_ub.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![feature(const_ptr_sub_ptr)]
12
#![feature(core_intrinsics)]
23

34
use std::intrinsics::{ptr_offset_from, ptr_offset_from_unsigned};

0 commit comments

Comments
 (0)