Skip to content

Commit 7e3e8bd

Browse files
author
Ryan van Polen
committed
Updated feature and stable flags
1 parent 7e19eef commit 7e3e8bd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

library/core/src/result.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,6 @@ impl<T, E> Result<Result<T, E>, E> {
16921692
/// # Examples
16931693
///
16941694
/// ```
1695-
/// #![feature(result_flattening)]
16961695
/// let x: Result<Result<&'static str, u32>, u32> = Ok(Ok("hello"));
16971696
/// assert_eq!(Ok("hello"), x.flatten());
16981697
///
@@ -1706,14 +1705,14 @@ impl<T, E> Result<Result<T, E>, E> {
17061705
/// Flattening only removes one level of nesting at a time:
17071706
///
17081707
/// ```
1709-
/// #![feature(result_flattening)]
17101708
/// let x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok("hello")));
17111709
/// assert_eq!(Ok(Ok("hello")), x.flatten());
17121710
/// assert_eq!(Ok("hello"), x.flatten().flatten());
17131711
/// ```
17141712
#[inline]
1715-
#[unstable(feature = "result_flattening", issue = "70142")]
1716-
#[rustc_const_unstable(feature = "result_flattening", issue = "70142")]
1713+
#[stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")]
1714+
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
1715+
#[rustc_const_stable(feature = "result_flattening", since = "CURRENT_RUSTC_VERSION")]
17171716
pub const fn flatten(self) -> Result<T, E> {
17181717
// FIXME(const-hack): could be written with `and_then`
17191718
match self {

0 commit comments

Comments
 (0)