@@ -1722,7 +1722,6 @@ impl<T, E> Result<Result<T, E>, E> {
1722
1722
/// # Examples
1723
1723
///
1724
1724
/// ```
1725
- /// #![feature(result_flattening)]
1726
1725
/// let x: Result<Result<&'static str, u32>, u32> = Ok(Ok("hello"));
1727
1726
/// assert_eq!(Ok("hello"), x.flatten());
1728
1727
///
@@ -1736,14 +1735,14 @@ impl<T, E> Result<Result<T, E>, E> {
1736
1735
/// Flattening only removes one level of nesting at a time:
1737
1736
///
1738
1737
/// ```
1739
- /// #![feature(result_flattening)]
1740
1738
/// let x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok("hello")));
1741
1739
/// assert_eq!(Ok(Ok("hello")), x.flatten());
1742
1740
/// assert_eq!(Ok("hello"), x.flatten().flatten());
1743
1741
/// ```
1744
1742
#[ inline]
1745
- #[ unstable( feature = "result_flattening" , issue = "70142" ) ]
1746
- #[ rustc_const_unstable( feature = "result_flattening" , issue = "70142" ) ]
1743
+ #[ stable( feature = "result_flattening" , since = "CURRENT_RUSTC_VERSION" ) ]
1744
+ #[ rustc_allow_const_fn_unstable( const_precise_live_drops) ]
1745
+ #[ rustc_const_stable( feature = "result_flattening" , since = "CURRENT_RUSTC_VERSION" ) ]
1747
1746
pub const fn flatten ( self ) -> Result < T , E > {
1748
1747
// FIXME(const-hack): could be written with `and_then`
1749
1748
match self {
0 commit comments