about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorWaffle <waffle.lapkin@gmail.com>2020-11-13 12:50:12 +0300
committerWaffle <waffle.lapkin@gmail.com>2021-01-31 22:30:19 +0300
commitd5c221107ec2bb1260f122f67c5217bc82ad90cc (patch)
treeae6872550d04a0f57c0d3f213db24497313480d2 /compiler/rustc_parse/src
parent95cbcad920d602cb7319e819e7ebc3cf56c20cd7 (diff)
downloadrust-d5c221107ec2bb1260f122f67c5217bc82ad90cc.tar.gz
rust-d5c221107ec2bb1260f122f67c5217bc82ad90cc.zip
add `Vec::extend_from_within` method
Implement <https://github.com/rust-lang/rfcs/pull/2714>, changes from the RFC:
- Rename the method `append_from_within` => `extend_from_within`
- Loose :Copy bound => :Clone
- Specialize in case of :Copy

This commit also adds `Vec::split_at_spare` private method and use it to implement
`Vec::spare_capacity_mut` and `Vec::extend_from_within`. This method returns 2
slices - initialized elements (same as `&mut vec[..]`) and uninitialized but
allocated space (same as `vec.spare_capacity_mut()`).
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions