diff options
| author | Sebastian Dröge <sebastian@centricular.com> | 2021-02-04 10:23:01 +0200 |
|---|---|---|
| committer | Sebastian Dröge <sebastian@centricular.com> | 2021-02-04 10:23:01 +0200 |
| commit | 86a4b27475aab52b998c15f5758540697cc9cff0 (patch) | |
| tree | ae73fd834da24211212ae754b5a3ef6c94afc095 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | e708cbd91c9cae4426d69270248362b423324556 (diff) | |
| download | rust-86a4b27475aab52b998c15f5758540697cc9cff0.tar.gz rust-86a4b27475aab52b998c15f5758540697cc9cff0.zip | |
Increment `self.index` before calling `Iterator::self.a.__iterator_get_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
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
