@@ -514,7 +514,6 @@ pub fn once_with<A, F: FnOnce() -> A>(gen: F) -> OnceWith<F> {
514514/// [module-level documentation]: index.html
515515///
516516/// ```
517- /// #![feature(iter_unfold)]
518517/// let mut count = 0;
519518/// let counter = std::iter::from_fn(move || {
520519/// // Increment our count. This is why we started at zero.
@@ -530,7 +529,7 @@ pub fn once_with<A, F: FnOnce() -> A>(gen: F) -> OnceWith<F> {
530529/// assert_eq!(counter.collect::<Vec<_>>(), &[1, 2, 3, 4, 5]);
531530/// ```
532531#[ inline]
533- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
532+ #[ stable ( feature = "iter_from_fn " , since = "1.34.0 " ) ]
534533pub fn from_fn < T , F > ( f : F ) -> FromFn < F >
535534 where F : FnMut ( ) -> Option < T >
536535{
@@ -544,10 +543,10 @@ pub fn from_fn<T, F>(f: F) -> FromFn<F>
544543///
545544/// [`iter::from_fn`]: fn.from_fn.html
546545#[ derive( Clone ) ]
547- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
546+ #[ stable ( feature = "iter_from_fn " , since = "1.34.0 " ) ]
548547pub struct FromFn < F > ( F ) ;
549548
550- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
549+ #[ stable ( feature = "iter_from_fn " , since = "1.34.0 " ) ]
551550impl < T , F > Iterator for FromFn < F >
552551 where F : FnMut ( ) -> Option < T >
553552{
@@ -559,7 +558,7 @@ impl<T, F> Iterator for FromFn<F>
559558 }
560559}
561560
562- #[ unstable ( feature = "iter_unfold " , issue = "55977 " ) ]
561+ #[ stable ( feature = "iter_from_fn " , since = "1.34.0 " ) ]
563562impl < F > fmt:: Debug for FromFn < F > {
564563 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
565564 f. debug_struct ( "FromFn" ) . finish ( )
0 commit comments