granite-rust/library/core
Matthias Krüger 14ef447d12
Rollup merge of - the8472:relax-zip-side-effect-guarantee, r=dtolnay
Weaken guarantee around advancing underlying iterators in zip

The current guarantee (introduced in ) is too strong as it prevents adapters from exploiting knowledge about the iterator length and using counted loops for example because they would stop calling `next()` before it ever returned `None`. Additionally several nested zip iterators already fail to uphold this.

This does not yet remove any of the specialization code that tries (and sometimes fails) to uphold the guarantee for `next()`
because removing it would also affect `next_back()` in more surprising ways.

The intent is to be able to remove for example this branch

36bcf40697/library/core/src/iter/adapters/zip.rs (L234-L243)

or this test

36bcf40697/library/core/tests/iter/adapters/zip.rs (L177-L188)

Solves  by declaring it a non-issue.
2021-11-27 11:46:40 +01:00
..
benches Auto merge of - falk-hueffner:speedup-int-log10-branchless, r=joshtriplett 2021-10-12 03:18:54 +00:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of - the8472:relax-zip-side-effect-guarantee, r=dtolnay 2021-11-27 11:46:40 +01:00
tests Partially stabilize duration_consts_2 2021-11-22 13:09:08 -05:00
Cargo.toml rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00