about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev+love@gmail.com>2022-11-20 13:15:59 +0900
committerGitHub <noreply@github.com>2022-11-20 13:15:59 +0900
commit785237d3924d4fb7b23803c964972dce82de2161 (patch)
treec3b5a12cfff05df99d15ec98e86583d3a4045dee /compiler/rustc_codegen_gcc
parente69b84204aecf27fe18ada467f78c83b788b80e4 (diff)
parent71bb200225f0164940acc21f1fb647c8155f1706 (diff)
downloadrust-785237d3924d4fb7b23803c964972dce82de2161.tar.gz
rust-785237d3924d4fb7b23803c964972dce82de2161.zip
Rollup merge of #104435 - scottmcm:iter-repeat-n, r=thomcc
`VecDeque::resize` should re-use the buffer in the passed-in element

Today it always copies it for *every* appended element, but one of those clones is avoidable.

This adds `iter::repeat_n` (https://github.com/rust-lang/rust/issues/104434) as the primitive needed to do this.  If this PR is acceptable, I'll also use this in `Vec` rather than its custom `ExtendElement` type & infrastructure that is harder to share between multiple different containers:

https://github.com/rust-lang/rust/blob/101e1822c3e54e63996c8aaa014d55716f3937eb/library/alloc/src/vec/mod.rs#L2479-L2492
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions