diff --git a/compiler/rustc_trait_selection/src/lib.rs b/compiler/rustc_trait_selection/src/lib.rs index 521e4ef0c9e..381da6f7e2a 100644 --- a/compiler/rustc_trait_selection/src/lib.rs +++ b/compiler/rustc_trait_selection/src/lib.rs @@ -23,7 +23,6 @@ #![feature(extract_if)] #![feature(if_let_guard)] #![feature(let_chains)] -#![feature(option_take_if)] #![feature(never_type)] #![feature(type_alias_impl_trait)] #![recursion_limit = "512"] // For rustdoc diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 9a527073602..e253cfd2822 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1708,8 +1708,6 @@ pub const fn take(&mut self) -> Option { /// # Examples /// /// ``` - /// #![feature(option_take_if)] - /// /// let mut x = Some(42); /// /// let prev = x.take_if(|v| if *v == 42 { @@ -1726,7 +1724,7 @@ pub const fn take(&mut self) -> Option { /// assert_eq!(prev, Some(43)); /// ``` #[inline] - #[unstable(feature = "option_take_if", issue = "98934")] + #[stable(feature = "option_take_if", since = "CURRENT_RUSTC_VERSION")] pub fn take_if

(&mut self, predicate: P) -> Option where P: FnOnce(&mut T) -> bool,