diff options
| author | bors <bors@rust-lang.org> | 2021-06-19 23:10:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-19 23:10:55 +0000 |
| commit | f639657fe4a16ec7704e0af77d0e5d5f587b59df (patch) | |
| tree | a7c164ff5a4367aff4fe181e3d30408aee91a1a2 /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | 150fad30ea25e812d481a784d02c95d3394b234b (diff) | |
| parent | d8530d0fa31224a2506a0932af5ac18d86c1bb0f (diff) | |
| download | rust-f639657fe4a16ec7704e0af77d0e5d5f587b59df.tar.gz rust-f639657fe4a16ec7704e0af77d0e5d5f587b59df.zip | |
Auto merge of #86433 - paolobarbolini:string-overlapping, r=m-ou-se
Use `copy_nonoverlapping` to copy `bytes` in `String::insert_bytes` The second copy could be made using `ptr::copy_nonoverlapping` instead of `ptr::copy`, since aliasing won't allow `self` and `bytes` to overlap. LLVM even seems to recognize this, [replacing the second `memmove` with a `memcopy`](https://rust.godbolt.org/z/Yoaa6rrGn), so this makes it so it's always applied.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions
