@@ -1692,7 +1692,6 @@ impl<T, E> Result<Result<T, E>, E> {
1692
1692
/// # Examples
1693
1693
///
1694
1694
/// ```
1695
- /// #![feature(result_flattening)]
1696
1695
/// let x: Result<Result<&'static str, u32>, u32> = Ok(Ok("hello"));
1697
1696
/// assert_eq!(Ok("hello"), x.flatten());
1698
1697
///
@@ -1706,14 +1705,14 @@ impl<T, E> Result<Result<T, E>, E> {
1706
1705
/// Flattening only removes one level of nesting at a time:
1707
1706
///
1708
1707
/// ```
1709
- /// #![feature(result_flattening)]
1710
1708
/// let x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok("hello")));
1711
1709
/// assert_eq!(Ok(Ok("hello")), x.flatten());
1712
1710
/// assert_eq!(Ok("hello"), x.flatten().flatten());
1713
1711
/// ```
1714
1712
#[ 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" ) ]
1717
1716
pub const fn flatten ( self ) -> Result < T , E > {
1718
1717
// FIXME(const-hack): could be written with `and_then`
1719
1718
match self {
0 commit comments