Change:
This is the tracking issue for . Currently in nightly, PR = .
Is this function now ready for stabilization?
I don’t see why not. Tracked here: fcp merge
Team member has proposed to merge this. The next step is review by the rest of the tagged team members: [x] [x] [x] [x] [x] [x] [ ] No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See for info about what commands tagged team members can give me.
:bell: This is now entering its final comment period, as per the . :bell:
The final comment period, with a disposition to merge, as per the , is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon.
I noticed that this iterator has been stabilized a impl which I assume wasn't intentional so I've submitted to remove it.

Discussion:
pub use self::sources::{from_fn, FromFn}; #[stable(feature = "iter_once", since = "1.2.0")] pub use self::sources::{once, Once}; <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> pub use self::sources::{once_with, OnceWith}; #[stable(feature = "rust1", since = "1.0.0")] pub use self::sources::{repeat, Repeat};

/// /// [`once_with`]: fn.once_with.html #[derive(Copy, Clone, Debug)] <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> pub struct OnceWith<F> { gen: Option<F>, } <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> impl<A, F: FnOnce() -> A> Iterator for OnceWith<F> { type Item = A;

} } <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> impl<A, F: FnOnce() -> A> DoubleEndedIterator for OnceWith<F> { fn next_back(&mut self) -> Option<A> { self.next() } } <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> impl<A, F: FnOnce() -> A> ExactSizeIterator for OnceWith<F> { fn len(&self) -> usize { self.gen.iter().len() } } <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> impl<A, F: FnOnce() -> A> FusedIterator for OnceWith<F> {} <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> unsafe impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F> {} /// Creates an iterator that lazily generates a value exactly once by invoking

/// Basic usage: /// /// ``` <del> /// #![feature(iter_once_with)] /// </del> /// use std::iter; /// /// // one is the loneliest number

/// `.foorc`: /// /// ```no_run <del> /// #![feature(iter_once_with)] /// </del> /// use std::iter; /// use std::fs; /// use std::path::PathBuf;

/// } /// ``` #[inline] <del> #[unstable(feature = "iter_once_with", issue = "57581")] </del> <ins> #[stable(feature = "iter_once_with", since = "1.43.0")] </ins> pub fn once_with<A, F: FnOnce() -> A>(gen: F) -> OnceWith<F> { OnceWith { gen: Some(gen) } }

#![feature(intrinsics)] #![feature(try_find)] #![feature(is_sorted)] <del> #![feature(iter_once_with)] </del> #![feature(lang_items)] #![feature(link_llvm_intrinsics)] #![feature(never_type)]

#![feature(hashmap_internals)] #![feature(try_find)] #![feature(is_sorted)] <del> #![feature(iter_once_with)] </del> #![feature(pattern)] #![feature(range_is_empty)] #![feature(raw)]