about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-02-04 10:23:01 +0200
committerSebastian Dröge <sebastian@centricular.com>2021-02-04 10:23:01 +0200
commit86a4b27475aab52b998c15f5758540697cc9cff0 (patch)
treeae73fd834da24211212ae754b5a3ef6c94afc095 /library/std/src/sys/unix/stack_overflow.rs
parente708cbd91c9cae4426d69270248362b423324556 (diff)
downloadrust-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