Skip to content

Commit 5ee5de1

Browse files
authored
Rollup merge of rust-lang#49575 - tmccombs:option-filter-stabilize, r=withoutboats
Stabilize `Option::filter`. Fixes rust-lang#45860
2 parents 77777b4 + c7ac32a commit 5ee5de1

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/libcore/option.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,6 @@ impl<T> Option<T> {
628628
/// # Examples
629629
///
630630
/// ```rust
631-
/// #![feature(option_filter)]
632-
///
633631
/// fn is_even(n: &i32) -> bool {
634632
/// n % 2 == 0
635633
/// }
@@ -639,7 +637,7 @@ impl<T> Option<T> {
639637
/// assert_eq!(Some(4).filter(is_even), Some(4));
640638
/// ```
641639
#[inline]
642-
#[unstable(feature = "option_filter", issue = "45860")]
640+
#[stable(feature = "option_filter", since = "1.27.0")]
643641
pub fn filter<P: FnOnce(&T) -> bool>(self, predicate: P) -> Self {
644642
if let Some(x) = self {
645643
if predicate(&x) {

src/librustc_typeck/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ This API is completely unstable and subject to change.
7676
#![feature(crate_visibility_modifier)]
7777
#![feature(from_ref)]
7878
#![feature(exhaustive_patterns)]
79-
#![feature(option_filter)]
8079
#![feature(quote)]
8180
#![feature(refcell_replace_swap)]
8281
#![feature(rustc_diagnostic_macros)]

0 commit comments

Comments
 (0)