about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2016-10-19 08:00:02 +0300
committerGitHub <noreply@github.com>2016-10-19 08:00:02 +0300
commit7b0eb102deb9853ca0aa50c56c09a603c4b04a40 (patch)
tree54f6a6c58ae2e3081a133e54298c2cdc8e62991b /src/test/incremental/thinlto
parentbeaa4c577963e4d1a401296b9e42067ff3890015 (diff)
parented5015939f02ce340bf3581c866f7b6ddabb6daf (diff)
downloadrust-7b0eb102deb9853ca0aa50c56c09a603c4b04a40.tar.gz
rust-7b0eb102deb9853ca0aa50c56c09a603c4b04a40.zip
Rollup merge of #37230 - bluss:zip-specialization-for-map, r=alexcrichton
Expand .zip() specialization to .map() and .cloned()

Implement .zip() specialization for Map and Cloned.

The crucial thing for transparent specialization is that we want to
preserve the potential side effects.

The simplest example is that in this code snippet:

`(0..6).map(f).zip((0..4).map(g)).count()`

`f` will be called five times, and `g` four times. The last time for `f`
is when the other iterator is at its end, so this element is unused.
This side effect can be preserved without disturbing code generation for
simple uses of `.map()`.

The `Zip::next_back()` case is even more complicated, unfortunately.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions