summary refs log tree commit diff
diff options
context:
space:
mode:
authorGeorge Bateman <george.bateman16@gmail.com>2024-10-18 21:23:16 +0100
committerTrevor Gross <tmgross@umich.edu>2024-11-20 07:54:12 -0500
commit5777c734383901b6c0ac1dc0ba04059f29cc88b1 (patch)
treeb0cad01e7735996dc28140a0536bd55725c96ea4
parentfda68927475070696fcc9d1f5c9c990f0e1af87a (diff)
downloadrust-5777c734383901b6c0ac1dc0ba04059f29cc88b1.tar.gz
rust-5777c734383901b6c0ac1dc0ba04059f29cc88b1.zip
Stabilize const_pin_2
-rw-r--r--library/core/src/lib.rs1
-rw-r--r--library/core/src/pin.rs6
-rw-r--r--library/core/tests/lib.rs1
3 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index 3b8ac20e527..d30bf96cfd4 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -121,7 +121,6 @@
 #![feature(const_float_methods)]
 #![feature(const_heap)]
 #![feature(const_nonnull_new)]
-#![feature(const_pin_2)]
 #![feature(const_ptr_sub_ptr)]
 #![feature(const_raw_ptr_comparison)]
 #![feature(const_size_of_val)]
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs
index 254b306fcaa..c14c49a0d92 100644
--- a/library/core/src/pin.rs
+++ b/library/core/src/pin.rs
@@ -1214,7 +1214,8 @@ impl<Ptr: Deref<Target: Unpin>> Pin<Ptr> {
     /// assert_eq!(*r, 5);
     /// ```
     #[inline(always)]
-    #[rustc_const_unstable(feature = "const_pin_2", issue = "76654")]
+    #[rustc_allow_const_fn_unstable(const_precise_live_drops)]
+    #[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
     #[stable(feature = "pin_into_inner", since = "1.39.0")]
     pub const fn into_inner(pin: Pin<Ptr>) -> Ptr {
         pin.__pointer
@@ -1503,7 +1504,8 @@ impl<Ptr: Deref> Pin<Ptr> {
     /// If the underlying data is [`Unpin`], [`Pin::into_inner`] should be used
     /// instead.
     #[inline(always)]
-    #[rustc_const_unstable(feature = "const_pin_2", issue = "76654")]
+    #[rustc_allow_const_fn_unstable(const_precise_live_drops)]
+    #[rustc_const_stable(feature = "const_pin", since = "CURRENT_RUSTC_VERSION")]
     #[stable(feature = "pin_into_inner", since = "1.39.0")]
     pub const unsafe fn into_inner_unchecked(pin: Pin<Ptr>) -> Ptr {
         pin.__pointer
diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs
index f515e9e4109..f7825571cd7 100644
--- a/library/core/tests/lib.rs
+++ b/library/core/tests/lib.rs
@@ -21,7 +21,6 @@
 #![feature(const_eval_select)]
 #![feature(const_heap)]
 #![feature(const_nonnull_new)]
-#![feature(const_pin_2)]
 #![feature(const_trait_impl)]
 #![feature(core_intrinsics)]
 #![feature(core_io_borrowed_buf)]