about summary refs log tree commit diff
path: root/library/alloc/src/vec/spec_extend.rs
AgeCommit message (Collapse)AuthorLines
2022-11-24Extract the logic for `TrustedLen` to a named method that can be called directlyScott McMurray-32/+2
2022-08-21Replace most uses of `pointer::offset` with `add` and `sub`Maybe Waffle-1/+1
2022-04-28Add VecDeque::extend from vec::IntoIter and slice::Iter specializationsPaolo Barbolini-1/+1
2021-06-22Add comments around code where ordering is important due for panic-safetyThe8472-0/+2
Iterators contain arbitrary code which may panic. Unsafe code has to be careful to do its state updates at the right point between calls that may panic.
2021-05-27Revert "Auto merge of #83770 - the8472:tra-extend, r=Mark-Simulacrum"The8472-59/+25
Due to a performance regression that didn't show up in the original perf run this reverts commit 9111b8ae9793f18179a1336417618fc07a9cac85, reversing changes made to 9a700d2947f2d7f97a2c0dfca3117a8dcc255bdd.
2021-05-26Auto merge of #83770 - the8472:tra-extend, r=Mark-Simulacrumbors-25/+59
Add `TrustedRandomAccess` specialization for `Vec::extend()` This should do roughly the same as the `TrustedLen` specialization but result in less IR by using `__iterator_get_unchecked` instead of `Iterator::for_each` Conflicting specializations are manually prioritized by grouping them under yet another helper trait.
2021-04-15Merge same condition branch in vec spec_extendIvan Tham-4/+2
2021-04-08add TrustedRandomAccess specialization to vec::extendThe8472-25/+59
This should do roughly the same as the TrustedLen specialization but result in less IR by using __iterator_get_unchecked instead of iterator.for_each.
2021-03-31panic early when TrustedLen indicates a length > usize::MAXThe8472-1/+6
2020-12-29style: applying Rust styleC-13/+13
2020-12-29refactor: moved SpecExtend into spec_extend.rsC-0/+82