about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-03-16 09:40:07 +0800
committerGitHub <noreply@github.com>2025-03-16 09:40:07 +0800
commit01bc95417c8f9b4709af679b584e1670d9b956ad (patch)
tree9bea51ee1e78a2ecd52fd1b149b038fd029b1856 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent5b9225070cee25f07086ff1db5b10abbae9a1918 (diff)
parent3c74d02319ea8ebbfd16f70f3154ce0aef87ae5c (diff)
downloadrust-01bc95417c8f9b4709af679b584e1670d9b956ad.tar.gz
rust-01bc95417c8f9b4709af679b584e1670d9b956ad.zip
Rollup merge of #138329 - scottmcm:assert-hint, r=Mark-Simulacrum
debug-assert that the size_hint is well-formed in `collect`

Closes #137919

In the hopes of helping to catch any future accidentally-incorrect rustc or stdlib iterators (like the ones #137908 accidentally found), this has `Iterator::collect` call `size_hint` and check its `low` doesn't exceed its `Some(high)`.

There's of course a bazillion more places this *could* be checked, but the hope is that this one is a good tradeoff of being likely to catch lots of things while having minimal maintenance cost (especially compared to putting it in *every* container's `from_iter`).
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions