about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-07 11:04:59 +0100
committerGitHub <noreply@github.com>2021-12-07 11:04:59 +0100
commit677f878e36e6b089c3213063508ec6b11c340a1f (patch)
treef4ab272b0f52cc8402b95fd339df7c2dadb2a949 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent57ae43d1f2f6053eebbf85313b418a8191d6e575 (diff)
parent9b86c5998c5b5b274b21651334a320aecc516dfc (diff)
downloadrust-677f878e36e6b089c3213063508ec6b11c340a1f.tar.gz
rust-677f878e36e6b089c3213063508ec6b11c340a1f.zip
Rollup merge of #91341 - scottmcm:array-iter-frp, r=kennytm
Add `array::IntoIter::{empty, from_raw_parts}`

`array::IntoIter` has a bunch of really handy logic for dealing with partial arrays, but it's currently hamstrung by only being creatable from a fully-initialized array.

This PR adds two new constructors:
- a safe & const `empty`, since `[].into_iter()` can only give `IntoIter<T, 0>`, not `IntoIter<T, N>`.
- an unsafe `from_raw_parts`, to allow experimentation with new uses.

(Slice & vec iterators don't need `from_raw_parts` because you `from_raw_parts` the slice or vec instead, but there's no useful way to made a `<[T; N]>::from_raw_parts`, so I think this is a reasonable place to have one.)
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions