Skip to content

Commit 7915732

Browse files
author
Stjepan Glavina
committed
Fix intradoc link and update issue number
1 parent 04c74f4 commit 7915732

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/libcore/iter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ pub use self::sources::{RepeatWith, repeat_with};
329329
pub use self::sources::{Empty, empty};
330330
#[stable(feature = "iter_once", since = "1.2.0")]
331331
pub use self::sources::{Once, once};
332-
#[unstable(feature = "iter_once_with", issue = "0")]
332+
#[unstable(feature = "iter_once_with", issue = "57581")]
333333
pub use self::sources::{OnceWith, once_with};
334334
#[unstable(feature = "iter_unfold", issue = "55977")]
335335
pub use self::sources::{Unfold, unfold, Successors, successors};

src/libcore/iter/sources.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,12 @@ pub fn once<T>(value: T) -> Once<T> {
385385
///
386386
/// [`once_with`]: fn.once_with.html
387387
#[derive(Copy, Clone, Debug)]
388-
#[unstable(feature = "iter_once_with", issue = "0")]
388+
#[unstable(feature = "iter_once_with", issue = "57581")]
389389
pub struct OnceWith<F> {
390390
gen: Option<F>,
391391
}
392392

393-
#[unstable(feature = "iter_once_with", issue = "0")]
393+
#[unstable(feature = "iter_once_with", issue = "57581")]
394394
impl<A, F: FnOnce() -> A> Iterator for OnceWith<F> {
395395
type Item = A;
396396

@@ -405,24 +405,24 @@ impl<A, F: FnOnce() -> A> Iterator for OnceWith<F> {
405405
}
406406
}
407407

408-
#[unstable(feature = "iter_once_with", issue = "0")]
408+
#[unstable(feature = "iter_once_with", issue = "57581")]
409409
impl<A, F: FnOnce() -> A> DoubleEndedIterator for OnceWith<F> {
410410
fn next_back(&mut self) -> Option<A> {
411411
self.next()
412412
}
413413
}
414414

415-
#[unstable(feature = "iter_once_with", issue = "0")]
415+
#[unstable(feature = "iter_once_with", issue = "57581")]
416416
impl<A, F: FnOnce() -> A> ExactSizeIterator for OnceWith<F> {
417417
fn len(&self) -> usize {
418418
self.gen.iter().len()
419419
}
420420
}
421421

422-
#[unstable(feature = "iter_once_with", issue = "0")]
422+
#[unstable(feature = "iter_once_with", issue = "57581")]
423423
impl<A, F: FnOnce() -> A> FusedIterator for OnceWith<F> {}
424424

425-
#[unstable(feature = "iter_once_with", issue = "0")]
425+
#[unstable(feature = "iter_once_with", issue = "57581")]
426426
unsafe impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F> {}
427427

428428
/// Creates an iterator that lazily generates a value exactly once by invoking
@@ -436,6 +436,7 @@ unsafe impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F> {}
436436
/// Unlike [`once`], this function will lazily generate the value on request.
437437
///
438438
/// [`once`]: fn.once.html
439+
/// [`chain`]: trait.Iterator.html#method.chain
439440
///
440441
/// # Examples
441442
///
@@ -480,7 +481,7 @@ unsafe impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F> {}
480481
/// }
481482
/// ```
482483
#[inline]
483-
#[unstable(feature = "iter_once_with", issue = "0")]
484+
#[unstable(feature = "iter_once_with", issue = "57581")]
484485
pub fn once_with<A, F: FnOnce() -> A>(gen: F) -> OnceWith<F> {
485486
OnceWith { gen: Some(gen) }
486487
}

0 commit comments

Comments
 (0)