core::iter::repeat_with: general fixes
This commit is contained in:
parent
0f789aad2b
commit
c4099ca4b1
3 changed files with 7 additions and 0 deletions
|
|
@ -333,6 +333,8 @@ pub use self::range::Step;
|
|||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use self::sources::{Repeat, repeat};
|
||||
#[unstable(feature = "iterator_repeat_with", issue = "0")]
|
||||
pub use self::sources::{RepeatWith, repeat_with};
|
||||
#[stable(feature = "iter_empty", since = "1.2.0")]
|
||||
pub use self::sources::{Empty, empty};
|
||||
#[stable(feature = "iter_once", since = "1.2.0")]
|
||||
|
|
|
|||
|
|
@ -162,6 +162,8 @@ unsafe impl<A, F: FnMut() -> A> TrustedLen for RepeatWith<F> {}
|
|||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature("iterator_repeat_with")]
|
||||
///
|
||||
/// use std::iter;
|
||||
///
|
||||
/// // let's assume we have some value of a type that is not `Clone`
|
||||
|
|
@ -182,6 +184,8 @@ unsafe impl<A, F: FnMut() -> A> TrustedLen for RepeatWith<F> {}
|
|||
/// Using mutation and going finite:
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature("iterator_repeat_with")]
|
||||
///
|
||||
/// use std::iter;
|
||||
///
|
||||
/// // From the zeroth to the third power of two:
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@
|
|||
#![feature(unwind_attributes)]
|
||||
#![feature(doc_spotlight)]
|
||||
#![feature(rustc_const_unstable)]
|
||||
#![feature(iterator_repeat_with)]
|
||||
|
||||
#[prelude_import]
|
||||
#[allow(unused)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue