rust/src/libcore
bors 17600c1ea7 Auto merge of #44682 - bluss:iter-rfold, r=dtolnay
Add iterator method .rfold(init, function); the reverse of fold

rfold is the reverse version of fold.

Fold allows iterators to implement a different (non-resumable) internal
iteration when it is more efficient than the external iteration implemented
through the next method. (Common examples are VecDeque and .chain()).

Introduce rfold() so that the same customization is available for reverse
iteration. This is achieved by both adding the method, and by having the
Rev\<I> adaptor connect Rev::rfold → I::fold and Rev::fold → I::rfold.

On the surface, rfold(..) is just .rev().fold(..), but the special case
implementations allow a data structure specific fold to be used through for
example .iter().rev(); we thus have gains even for users never calling exactly
rfold themselves.
2017-09-21 23:44:11 +00:00
..
benches Customize <FlatMap as Iterator>::fold 2017-09-14 13:51:32 -07:00
fmt Use a byte literal ASCII 0 instead of its decimal value 2017-08-29 10:01:12 -07:00
hash impl Hasher for {&mut Hasher, Box<Hasher>} 2017-09-12 17:28:07 +08:00
iter Auto merge of #44682 - bluss:iter-rfold, r=dtolnay 2017-09-21 23:44:11 +00:00
num change #![feature(const_fn)] to specific gates 2017-09-16 15:53:02 +00:00
ops add error message for the other case too 2017-09-03 13:10:54 +03:00
prelude Run rustfmt on libcore/prelude folder 2016-10-16 22:13:04 +05:30
slice Remove Borrow bound from SliceExt::binary_search 2017-08-30 12:02:25 -05:00
str Rollup merge of #44657 - Ixrec:patch-1, r=eddyb 2017-09-18 11:04:25 -05:00
sync Added more text from unstable-book to compiler_fence docs 2017-09-16 22:18:46 +02:00
tests Rollup merge of #44593 - budziq:stabilize_ord_max_min, r=alexcrichton 2017-09-16 17:09:40 -07:00
any.rs Various fixes to wording consistency in the docs 2017-03-22 17:19:52 +01:00
array.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00
borrow.rs Update older URLs pointing to the first edition of the Book 2017-06-15 00:04:00 +09:00
Cargo.toml Integrate jobserver support to parallel codegen 2017-06-21 07:16:43 -07:00
cell.rs change #![feature(const_fn)] to specific gates 2017-09-16 15:53:02 +00:00
char.rs std: Stabilize char_escape_debug 2017-07-25 07:09:31 -07:00
char_private.rs Reduce a table used for Debug impl of str. 2017-04-05 09:13:19 -07:00
clone.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00
cmp.rs stabilized ord_max_min (fixes #25663) 2017-09-15 12:54:03 +02:00
convert.rs Update older URLs pointing to the first edition of the Book 2017-06-15 00:04:00 +09:00
default.rs Fix "Quasi-quoting is inefficient" warning in incremental rustbuild. 2017-07-18 01:49:40 +08:00
internal_macros.rs Fix a few impl stability attributes 2017-01-29 13:31:47 +00:00
intrinsics.rs Add <*const T>::align_offset and use it in memchr 2017-09-17 21:30:58 +02:00
iter_private.rs Various fixes to wording consistency in the docs 2017-03-22 17:19:52 +01:00
lib.rs change #![feature(const_fn)] to specific gates 2017-09-16 15:53:02 +00:00
macros.rs Use rvalue promotion to 'static instead of static items. 2017-09-10 11:20:27 +03:00
marker.rs Removed as many "```ignore" as possible. 2017-06-23 15:31:53 +08:00
mem.rs stabilized needs_drop (fixes #41890) 2017-09-16 23:41:04 +02:00
nonzero.rs change #![feature(const_fn)] to specific gates 2017-09-16 15:53:02 +00:00
option.rs Rollup merge of #43705 - panicbit:option_ref_mut_cloned, r=aturon 2017-08-29 21:40:53 +00:00
panicking.rs Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
ptr.rs Add <*const T>::align_offset and use it in memchr 2017-09-17 21:30:58 +02:00
raw.rs Fix up various links 2017-03-20 10:10:16 -04:00
result.rs Add missing urls for Result struct 2017-08-18 16:48:07 +02:00
tuple.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00