From 0e4f335e634d16f399647353dd70666423e402b4 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 11 Jul 2020 13:07:39 +0200 Subject: [PATCH] stabilize ptr_offset_from --- library/alloc/src/lib.rs | 1 - library/core/src/ptr/const_ptr.rs | 2 +- library/core/src/ptr/mut_ptr.rs | 2 +- src/librustdoc/lib.rs | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 892f794fc42..17573f319e2 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -113,7 +113,6 @@ #![feature(or_patterns)] #![feature(pattern)] #![feature(ptr_internals)] -#![feature(ptr_offset_from)] #![feature(raw_ref_op)] #![feature(rustc_attrs)] #![feature(receiver_trait)] diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 4b61a6d2863..999c908ca66 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -370,7 +370,7 @@ impl *const T { /// let zero = ptr2_other.offset_from(ptr2); // Undefined Behavior /// } /// ``` - #[unstable(feature = "ptr_offset_from", issue = "41079")] + #[stable(feature = "ptr_offset_from", since = "1.46.0")] #[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")] #[inline] pub const unsafe fn offset_from(self, origin: *const T) -> isize diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 36398c3f65a..f4b28290f32 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -541,7 +541,7 @@ impl *mut T { /// let zero = ptr2_other.offset_from(ptr2); // Undefined Behavior /// } /// ``` - #[unstable(feature = "ptr_offset_from", issue = "41079")] + #[stable(feature = "ptr_offset_from", since = "1.46.0")] #[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")] #[inline] pub const unsafe fn offset_from(self, origin: *const T) -> isize diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 3dfa7b529e3..b017fee7e27 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -9,7 +9,6 @@ #![feature(nll)] #![feature(or_patterns)] #![feature(test)] -#![feature(ptr_offset_from)] #![feature(crate_visibility_modifier)] #![feature(never_type)] #![feature(once_cell)]