diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-02-12 22:53:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-12 22:53:32 +0100 |
| commit | 0cfba2fd090834c909d5ed9deccdee8170da791b (patch) | |
| tree | 44dc801719660800028a160334a7c36c85b0f1eb /src/test/codegen | |
| parent | 58d72aedeee8dcce9cf227d3ac34088e88494939 (diff) | |
| parent | 86a4b27475aab52b998c15f5758540697cc9cff0 (diff) | |
| download | rust-0cfba2fd090834c909d5ed9deccdee8170da791b.tar.gz rust-0cfba2fd090834c909d5ed9deccdee8170da791b.zip | |
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
Diffstat (limited to 'src/test/codegen')
0 files changed, 0 insertions, 0 deletions
