Skip to content

Commit 6ab50dd

Browse files
committed
stabilize const_option_ext
1 parent 33fa870 commit 6ab50dd

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
#![feature(const_float_methods)]
121121
#![feature(const_heap)]
122122
#![feature(const_nonnull_new)]
123-
#![feature(const_option_ext)]
124123
#![feature(const_pin_2)]
125124
#![feature(const_ptr_is_null)]
126125
#![feature(const_ptr_sub_ptr)]

core/src/option.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ impl<T> Option<T> {
738738
#[inline]
739739
#[must_use]
740740
#[stable(feature = "pin", since = "1.33.0")]
741-
#[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
741+
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
742742
pub const fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&T>> {
743743
// FIXME(const-hack): use `map` once that is possible
744744
match Pin::get_ref(self).as_ref() {
@@ -755,7 +755,7 @@ impl<T> Option<T> {
755755
#[inline]
756756
#[must_use]
757757
#[stable(feature = "pin", since = "1.33.0")]
758-
#[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
758+
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
759759
pub const fn as_pin_mut(self: Pin<&mut Self>) -> Option<Pin<&mut T>> {
760760
// SAFETY: `get_unchecked_mut` is never used to move the `Option` inside `self`.
761761
// `x` is guaranteed to be pinned because it comes from `self` which is pinned.
@@ -802,7 +802,7 @@ impl<T> Option<T> {
802802
#[inline]
803803
#[must_use]
804804
#[stable(feature = "option_as_slice", since = "1.75.0")]
805-
#[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
805+
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
806806
pub const fn as_slice(&self) -> &[T] {
807807
// SAFETY: When the `Option` is `Some`, we're using the actual pointer
808808
// to the payload, with a length of 1, so this is equivalent to
@@ -857,7 +857,7 @@ impl<T> Option<T> {
857857
#[inline]
858858
#[must_use]
859859
#[stable(feature = "option_as_slice", since = "1.75.0")]
860-
#[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
860+
#[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
861861
pub const fn as_mut_slice(&mut self) -> &mut [T] {
862862
// SAFETY: When the `Option` is `Some`, we're using the actual pointer
863863
// to the payload, with a length of 1, so this is equivalent to

core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#![feature(const_eval_select)]
2222
#![feature(const_heap)]
2323
#![feature(const_nonnull_new)]
24-
#![feature(const_option_ext)]
2524
#![feature(const_pin_2)]
2625
#![feature(const_trait_impl)]
2726
#![feature(core_intrinsics)]

0 commit comments

Comments
 (0)