diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 5e6fe3b9b32b9..34d2cfc8e2c5b 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -112,7 +112,6 @@ #![feature(maybe_uninit_slice)] #![cfg_attr(test, feature(new_uninit))] #![feature(nonnull_slice_from_raw_parts)] -#![feature(option_result_unwrap_unchecked)] #![feature(pattern)] #![feature(ptr_internals)] #![feature(receiver_trait)] diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 8a6be7f2b356a..baf9948857bbe 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -800,19 +800,17 @@ impl Option { /// # Examples /// /// ``` - /// #![feature(option_result_unwrap_unchecked)] /// let x = Some("air"); /// assert_eq!(unsafe { x.unwrap_unchecked() }, "air"); /// ``` /// /// ```no_run - /// #![feature(option_result_unwrap_unchecked)] /// let x: Option<&str> = None; /// assert_eq!(unsafe { x.unwrap_unchecked() }, "air"); // Undefined behavior! /// ``` #[inline] #[track_caller] - #[unstable(feature = "option_result_unwrap_unchecked", reason = "newly added", issue = "81383")] + #[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")] pub unsafe fn unwrap_unchecked(self) -> T { debug_assert!(self.is_some()); match self { diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 75f2c222ba834..8fec2e928aae2 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1096,19 +1096,17 @@ impl Result { /// # Examples /// /// ``` - /// #![feature(option_result_unwrap_unchecked)] /// let x: Result = Ok(2); /// assert_eq!(unsafe { x.unwrap_unchecked() }, 2); /// ``` /// /// ```no_run - /// #![feature(option_result_unwrap_unchecked)] /// let x: Result = Err("emergency failure"); /// unsafe { x.unwrap_unchecked(); } // Undefined behavior! /// ``` #[inline] #[track_caller] - #[unstable(feature = "option_result_unwrap_unchecked", reason = "newly added", issue = "81383")] + #[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")] pub unsafe fn unwrap_unchecked(self) -> T { debug_assert!(self.is_ok()); match self { @@ -1130,19 +1128,17 @@ impl Result { /// # Examples /// /// ```no_run - /// #![feature(option_result_unwrap_unchecked)] /// let x: Result = Ok(2); /// unsafe { x.unwrap_err_unchecked() }; // Undefined behavior! /// ``` /// /// ``` - /// #![feature(option_result_unwrap_unchecked)] /// let x: Result = Err("emergency failure"); /// assert_eq!(unsafe { x.unwrap_err_unchecked() }, "emergency failure"); /// ``` #[inline] #[track_caller] - #[unstable(feature = "option_result_unwrap_unchecked", reason = "newly added", issue = "81383")] + #[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")] pub unsafe fn unwrap_err_unchecked(self) -> E { debug_assert!(self.is_err()); match self { diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs index 88a183f75f3b7..c8281f2974994 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -59,7 +59,6 @@ #![feature(const_raw_ptr_deref)] #![feature(never_type)] #![feature(unwrap_infallible)] -#![feature(option_result_unwrap_unchecked)] #![feature(result_into_ok_or_err)] #![feature(ptr_metadata)] #![feature(once_cell)]