about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-10-26 11:43:32 -0700
committerGitHub <noreply@github.com>2016-10-26 11:43:32 -0700
commit3a25b65c1fbdd6101b77e8a8b06a5e42d775dc3f (patch)
tree4e2a55a6f3807b9411a74bdb25978c4f87d3baf4 /src/test/run-pass/thinlto
parenta5b6a9fa8ad2e13adbfcc5f3f624d9252379d745 (diff)
parenta16626fc422f9fdcd1d02f56b628f764d5282261 (diff)
downloadrust-3a25b65c1fbdd6101b77e8a8b06a5e42d775dc3f.tar.gz
rust-3a25b65c1fbdd6101b77e8a8b06a5e42d775dc3f.zip
Auto merge of #37315 - bluss:fold-more, r=alexcrichton
Implement Iterator::fold for .chain(), .cloned(), .map() and the VecDeque iterators.

Chain can do something interesting here where it passes on the fold
into its inner iterators.

The lets the underlying iterator's custom fold() be used, and skips the
regular chain logic in next.

Also implement .fold() specifically for .map() and .cloned() so that any
inner fold improvements are available through map and cloned.

The same way, a VecDeque iterator fold can be turned into two slice folds.

These changes lend the power of the slice iterator's loop codegen to
VecDeque, and to chains of slice iterators, and so on.
It's an improvement for .sum() and .product(), and other uses of fold.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions