Skip to content

Commit

Permalink
Do not include const_ptr_sub_ptr in this stabilization
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Aug 25, 2022
1 parent ad93272 commit 69ad634
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,7 @@ extern "rust-intrinsic" {
pub fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;

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

/// See documentation of `<*const T>::guaranteed_eq` for details.
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/consts/offset_from_ub.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![feature(const_ptr_sub_ptr)]
#![feature(core_intrinsics)]

use std::intrinsics::{ptr_offset_from, ptr_offset_from_unsigned};
Expand Down

0 comments on commit 69ad634

Please sign in to comment.