diff options
| author | Ryan van Polen <ryan@radix-security.com> | 2025-05-16 10:32:12 +0200 |
|---|---|---|
| committer | Ryan van Polen <ryan@radix-security.com> | 2025-05-16 11:59:08 +0200 |
| commit | 7e3e8bdec4c992d2ec7474c1b70fb61aaaa9ed7e (patch) | |
| tree | 0d5d21f9e446a19f8ee8340653e6cc07df851939 | |
| parent | 7e19eef048ba58c28c70afbf5f95da4829c15796 (diff) | |
| download | rust-7e3e8bdec4c992d2ec7474c1b70fb61aaaa9ed7e.tar.gz rust-7e3e8bdec4c992d2ec7474c1b70fb61aaaa9ed7e.zip | |
Updated feature and stable flags
| -rw-r--r-- | library/core/src/result.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 736ffb7d0ca..1bf713eaa89 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1692,7 +1692,6 @@ impl<T, E> Result<Result<T, E>, E> { /// # Examples /// /// ``` - /// #![feature(result_flattening)] /// let x: Result<Result<&'static str, u32>, u32> = Ok(Ok("hello")); /// assert_eq!(Ok("hello"), x.flatten()); /// @@ -1706,14 +1705,14 @@ impl<T, E> Result<Result<T, E>, E> { /// Flattening only removes one level of nesting at a time: /// /// ``` - /// #![feature(result_flattening)] /// let x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok("hello"))); /// assert_eq!(Ok(Ok("hello")), x.flatten()); /// assert_eq!(Ok("hello"), x.flatten().flatten()); /// ``` #[inline] - #[unstable(feature = "result_flattening", issue = "70142")] - #[rustc_const_unstable(feature = "result_flattening", issue = "70142")] + #[stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")] + #[rustc_allow_const_fn_unstable(const_precise_live_drops)] + #[rustc_const_stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")] pub const fn flatten(self) -> Result<T, E> { // FIXME(const-hack): could be written with `and_then` match self { |
