about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-05-30 13:45:06 +0200
committerGitHub <noreply@github.com>2020-05-30 13:45:06 +0200
commit8d64fd80adef2c80325f7a5a545108035198daba (patch)
treed4c7cc359f8fe829430ca74ed89883f1b0aa72e2 /src/rustllvm/RustWrapper.cpp
parent49ca99de93f8ed26b16ac2ef70c61c7ed2267754 (diff)
parentdbf32e2270f82601bd2816da270ce70269cc59ba (diff)
downloadrust-8d64fd80adef2c80325f7a5a545108035198daba.tar.gz
rust-8d64fd80adef2c80325f7a5a545108035198daba.zip
Rollup merge of #72499 - mendess:master, r=dtolnay
Override Box::<[T]>::clone_from

Avoid dropping and reallocating when cloning to an existing box if the lengths are the same.

It would be nice if this could also be specialized for `Copy` but I don't know how that works since it's not on stable. Will gladly look into it if it's deemed as a good idea.

This is my first PR with code, hope I did everything right :smile:
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions