Files
rust/library
许杰友 Jieyou Xu (Joe) 01bc95417c 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`).
2025-03-16 09:40:07 +08:00
..
2025-03-07 19:11:13 +00:00
2025-02-13 14:32:50 -08:00
2025-03-10 12:20:05 +01:00
2025-02-09 17:11:13 +00:00
2025-03-06 11:11:55 -08:00
2025-03-11 09:46:34 -07:00