]> git.lizzy.rs Git - rust.git/commitdiff
core::iter::repeat_with: general fixes
authorMazdak Farrokhzad <twingoow@gmail.com>
Mon, 12 Feb 2018 07:25:39 +0000 (08:25 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Mon, 12 Feb 2018 07:25:39 +0000 (08:25 +0100)
src/libcore/iter/mod.rs
src/libcore/iter/sources.rs
src/libcore/lib.rs

index 29b62c901f310822aa215be09d50002d99a3b5ef..ac3fb5a57dd38e244c298dacc5a1cd7904dd5249 100644 (file)
 
 #[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")]
index 980f3fc7443ace45bc39f6827abd13a74b5616a5..2cf90fd079e22b354910042330fdba6391d66f6a 100644 (file)
@@ -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:
index 59a296c2a762c5e5a25ac3d3e1bcb55e11722502..447e144bf0fd6083b43a7ec4f4a99284994d18da 100644 (file)
@@ -92,6 +92,7 @@
 #![feature(unwind_attributes)]
 #![feature(doc_spotlight)]
 #![feature(rustc_const_unstable)]
+#![feature(iterator_repeat_with)]
 
 #[prelude_import]
 #[allow(unused)]