diff options
author | Yuki Okushi <jtitor@2k36.org> | 2021-10-21 14:11:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 14:11:13 +0900 |
commit | 3680ecd8a6e8dcac98833bc8bbc349277f780419 (patch) | |
tree | c96cd17109ce7c0f9bd8ea0e2d5ab1e4f6cf56ef /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
parent | 68a5680fc5961f1c91e79debae2f0994c1136a69 (diff) | |
parent | 0aa68a8db9dfffb2756279cc621b1b15a896423d (diff) | |
download | rust-3680ecd8a6e8dcac98833bc8bbc349277f780419.tar.gz |
Rollup merge of #90099 - SkiFire13:fix-vec-swap-remove, r=dtolnay
Fix MIRI UB in `Vec::swap_remove`
Fixes #90055
I find it weird that `Vec::swap_remove` read the last element to the stack just to immediately put it back in the `Vec` in place of the one at index `index`. It seems much more natural to me to just read the element at position `index` and then move the last element in its place. I guess this might also slightly improve codegen.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions