about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2021-04-02 19:56:18 -0700
committerCamelid <camelidcamel@gmail.com>2021-04-05 19:09:51 -0700
commit09ff88b600713a2bfca7cfdfd1828b519c907247 (patch)
treef6c137a1f7fb5d3dd7a82dbc4179919615d0657b /compiler/rustc_codegen_llvm/src
parent36bcf4069717b9dff90270d13b53a3b130329960 (diff)
downloadrust-09ff88b600713a2bfca7cfdfd1828b519c907247.tar.gz
rust-09ff88b600713a2bfca7cfdfd1828b519c907247.zip
Add `FromIterator` and `IntoIterator` impls for `ThinVec`
These should make using `ThinVec` feel much more like using `Vec`.
They will allow users of `Vec` to switch to `ThinVec` while continuing
to use `collect()`, `for` loops, and other parts of the iterator API.

I don't know if there were use cases before for using the iterator API
with `ThinVec`, but I would like to start using `ThinVec` in rustdoc,
and having it conform to the iterator API would make the transition
*a lot* easier.

I added a `FromIterator` impl, an `IntoIterator` impl that yields owned
elements, and `IntoIterator` impls that yield immutable or mutable
references to elements. I also added some unit tests for `ThinVec`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions