rust/library/core/src/iter
Dylan DPC 0cfba2fd09
Rollup merge of #81741 - sdroege:zip-trusted-random-access-specialization-panic-safety, r=KodrAus
Increment `self.index` before calling `Iterator::self.a.__iterator_ge…

…`t_unchecked` in `Zip` `TrustedRandomAccess` specialization

Otherwise if `Iterator::self.a.__iterator_get_unchecked` panics the
index would not have been incremented yet and another call to
`Iterator::next` would read from the same index again, which is not
allowed according to the API contract of `TrustedRandomAccess` for
`!Clone`.

Fixes https://github.com/rust-lang/rust/issues/81740
2021-02-12 22:53:32 +01:00
..
adapters Rollup merge of #81741 - sdroege:zip-trusted-random-access-specialization-panic-safety, r=KodrAus 2021-02-12 22:53:32 +01:00
sources Remove multiline uses 2020-11-22 02:39:22 +03:00
traits Rollup merge of #81697 - xfix:every-doc-alias, r=Mark-Simulacrum 2021-02-09 02:39:51 +01:00
mod.rs Add Iterator::intersperse_with 2020-12-31 23:09:13 +01:00
range.rs Allow libcore to be built with MIR inlining 2021-01-23 16:51:23 +00:00
sources.rs Split iterator sources into different modules 2020-11-22 02:39:21 +03:00