@@ -572,13 +572,12 @@ impl<F> fmt::Debug for FromFn<F> {
572572/// and calls the given `FnMut(&T) -> Option<T>` closure to compute each item’s successor.
573573///
574574/// ```
575- /// #![feature(iter_unfold)]
576575/// use std::iter::successors;
577576///
578577/// let powers_of_10 = successors(Some(1_u16), |n| n.checked_mul(10));
579578/// assert_eq!(powers_of_10.collect::<Vec<_>>(), &[1, 10, 100, 1_000, 10_000]);
580579/// ```
581- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
580+ #[ stable ( feature = "iter_successors " , since = "1.34.0 " ) ]
582581pub fn successors < T , F > ( first : Option < T > , succ : F ) -> Successors < T , F >
583582 where F : FnMut ( & T ) -> Option < T >
584583{
@@ -598,13 +597,13 @@ pub fn successors<T, F>(first: Option<T>, succ: F) -> Successors<T, F>
598597///
599598/// [`successors`]: fn.successors.html
600599#[ derive( Clone ) ]
601- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
600+ #[ stable ( feature = "iter_successors " , since = "1.34.0 " ) ]
602601pub struct Successors < T , F > {
603602 next : Option < T > ,
604603 succ : F ,
605604}
606605
607- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
606+ #[ stable ( feature = "iter_successors " , since = "1.34.0 " ) ]
608607impl < T , F > Iterator for Successors < T , F >
609608 where F : FnMut ( & T ) -> Option < T >
610609{
@@ -628,12 +627,12 @@ impl<T, F> Iterator for Successors<T, F>
628627 }
629628}
630629
631- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
630+ #[ stable ( feature = "iter_successors " , since = "1.34.0 " ) ]
632631impl < T , F > FusedIterator for Successors < T , F >
633632 where F : FnMut ( & T ) -> Option < T >
634633{ }
635634
636- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
635+ #[ stable ( feature = "iter_successors " , since = "1.34.0 " ) ]
637636impl < T : fmt:: Debug , F > fmt:: Debug for Successors < T , F > {
638637 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
639638 f. debug_struct ( "Successors" )
0 commit comments