about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorNeil Roberts <bpeeluk@yahoo.co.uk>2023-01-28 14:52:31 +0100
committerNeil Roberts <bpeeluk@yahoo.co.uk>2023-01-28 20:37:01 +0100
commita34f11c006936f0935c0f3484f9a292901d0eade (patch)
tree05f4f78b355e27cbec00b0fdb00a33ec36ba7c23 /compiler/rustc_codegen_llvm/src/errors.rs
parentba80c662f448c69cbd184d18630b8824f0169b2e (diff)
downloadrust-a34f11c006936f0935c0f3484f9a292901d0eade.tar.gz
rust-a34f11c006936f0935c0f3484f9a292901d0eade.zip
vec: Use SpecCloneIntoVec::clone_into to implement Vec::clone_from
In the past, Vec::clone_from was implemented using slice::clone_into.
The code from clone_into was later duplicated into clone_from in
8725e4c337, which is the commit that adds custom allocator support to
Vec. Presumably this was done because the slice::clone_into only works
for vecs with the default allocator so it would have the wrong type to
clone into Vec<T, A>.

Now that the clone_into implementation is moved out into a specializable
trait anyway we might as well use that to share the code between the two
methods.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions