about summary refs log tree commit diff
path: root/src/libcore/lib.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-02-14 16:14:42 +0800
committerkennytm <kennytm@gmail.com>2018-02-14 18:25:22 +0800
commitbebd2fbfc836f871721057766a90775efa86e6a2 (patch)
tree95c390683b7b3bc02ce8f7741ad131fcf381f875 /src/libcore/lib.rs
parentdcb15269f676f5188f048d4ba014c402a1378086 (diff)
parentdb13296b6fd6b68ab06055bdcb9a22078b11de6a (diff)
Rollup merge of #48156 - Centril:feature/iterator_repeat_with, r=alexcrichton
Add std/core::iter::repeat_with

Adds an iterator primitive `repeat_with` which is the "lazy" version of `repeat` but also more flexible since you can build up state with the `FnMut`. The design is mostly taken from `repeat`.

r? @rust-lang/libs
cc @withoutboats, @scottmcm
Diffstat (limited to 'src/libcore/lib.rs')
-rw-r--r--src/libcore/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 59a296c2a76..447e144bf0f 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -92,6 +92,7 @@
 #![feature(unwind_attributes)]
 #![feature(doc_spotlight)]
 #![feature(rustc_const_unstable)]
+#![feature(iterator_repeat_with)]
 
 #[prelude_import]
 #[allow(unused)]