rust/library/core
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
..
benches Add more benchmarks 2021-01-08 09:50:35 +00:00
src Rollup merge of #81741 - sdroege:zip-trusted-random-access-specialization-panic-safety, r=KodrAus 2021-02-12 22:53:32 +01:00
tests stabilize partition_point 2021-02-12 21:57:17 +09:00
Cargo.toml