From e576a9b554f24a26c36c04b41c901636d190605b Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 15 Aug 2022 17:34:09 +0200 Subject: [PATCH] Adjust ptr_const_cast stabilization version to CURRENT_RUSTC_VERSION --- library/core/src/ptr/const_ptr.rs | 4 ++-- library/core/src/ptr/mut_ptr.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 08fbb79fa654c..b8486af00186b 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -95,8 +95,8 @@ impl *const T { /// /// This is a bit safer than `as` because it wouldn't silently change the type if the code is /// refactored. - #[stable(feature = "ptr_const_cast", since = "1.65.0")] - #[rustc_const_stable(feature = "ptr_const_cast", since = "1.65.0")] + #[stable(feature = "ptr_const_cast", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "ptr_const_cast", since = "CURRENT_RUSTC_VERSION")] pub const fn cast_mut(self) -> *mut T { self as _ } diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 8467469053151..a183614055934 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -100,8 +100,8 @@ impl *mut T { /// coercion. /// /// [`cast_mut`]: #method.cast_mut - #[stable(feature = "ptr_const_cast", since = "1.65.0")] - #[rustc_const_stable(feature = "ptr_const_cast", since = "1.65.0")] + #[stable(feature = "ptr_const_cast", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "ptr_const_cast", since = "CURRENT_RUSTC_VERSION")] pub const fn cast_const(self) -> *const T { self as _ }