diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs index 676874c8b27df..79e5ba340b784 100644 --- a/src/liballoc/tests/lib.rs +++ b/src/liballoc/tests/lib.rs @@ -3,7 +3,6 @@ #![feature(drain_filter)] #![feature(exact_size_is_empty)] #![feature(new_uninit)] -#![feature(option_flattening)] #![feature(pattern)] #![feature(trusted_len)] #![feature(try_reserve)] diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 89f2d7ab29c93..f0ac5e749f6b3 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -1567,7 +1567,6 @@ impl Option> { /// # Examples /// Basic usage: /// ``` - /// #![feature(option_flattening)] /// let x: Option> = Some(Some(6)); /// assert_eq!(Some(6), x.flatten()); /// @@ -1579,13 +1578,12 @@ impl Option> { /// ``` /// Flattening once only removes one level of nesting: /// ``` - /// #![feature(option_flattening)] /// let x: Option>> = Some(Some(Some(6))); /// assert_eq!(Some(Some(6)), x.flatten()); /// assert_eq!(Some(6), x.flatten().flatten()); /// ``` #[inline] - #[unstable(feature = "option_flattening", issue = "60258")] + #[stable(feature = "option_flattening", since = "1.40.0")] pub fn flatten(self) -> Option { self.and_then(convert::identity) }