about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-08-15 04:48:42 +0000
committerbors <bors@rust-lang.org>2021-08-15 04:48:42 +0000
commit40db258731a912325de612a1fc06d14e6df959ab (patch)
tree5a141a959a90ddb968f6dd3fe002615bb37e8c1c /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent85109e257ac97a0904106cafaf6e014c1d812326 (diff)
parent3f0d04e97b6e595fdff4895dfc4a35a2bd39f739 (diff)
downloadrust-40db258731a912325de612a1fc06d14e6df959ab.tar.gz
rust-40db258731a912325de612a1fc06d14e6df959ab.zip
Auto merge of #87974 - steffahn:slice_split_size_hints, r=dtolnay
Test and fix `size_hint` for slice’s [r]split* iterators

Adds extensive test (of `size_hint`) for all the _[r]split*_ iterators.
Fixes `size_hint` upper bound for _split_inclusive*_ iterators which was one higher than necessary for non-empty slices.
Fixes `size_hint` lower bound for _[r]splitn*_ iterators when _n == 0_, which was one too high.

**Lower bound being one too high was a logic error, violating the correctness condition of `size_hint`.**

_Edit:_ I’ve opened an issue for that bug, so this PR fixes #87978
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions