about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-04-11 19:56:42 +0800
committerGitHub <noreply@github.com>2018-04-11 19:56:42 +0800
commit5ee5de10d2d19eebbca26fbc31b7e49cb51406b1 (patch)
tree84b84e7c375047b7bed209304bc26fa65ac2fdf5 /src/libcore
parent77777b4528827af7044c987f4f291775fd7a5b0b (diff)
parentc7ac32a1c1b35cb2206d9f09549cf93ef8b31e76 (diff)
downloadrust-5ee5de10d2d19eebbca26fbc31b7e49cb51406b1.tar.gz
rust-5ee5de10d2d19eebbca26fbc31b7e49cb51406b1.zip
Rollup merge of #49575 - tmccombs:option-filter-stabilize, r=withoutboats
Stabilize `Option::filter`.

Fixes #45860
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/option.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 61ef6798b2e..0dfdabee031 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -628,8 +628,6 @@ impl<T> Option<T> {
     /// # Examples
     ///
     /// ```rust
-    /// #![feature(option_filter)]
-    ///
     /// fn is_even(n: &i32) -> bool {
     ///     n % 2 == 0
     /// }
@@ -639,7 +637,7 @@ impl<T> Option<T> {
     /// assert_eq!(Some(4).filter(is_even), Some(4));
     /// ```
     #[inline]
-    #[unstable(feature = "option_filter", issue = "45860")]
+    #[stable(feature = "option_filter", since = "1.27.0")]
     pub fn filter<P: FnOnce(&T) -> bool>(self, predicate: P) -> Self {
         if let Some(x) = self {
             if predicate(&x) {