InclusiveRange's size_hint can give 1 when empty, despite implementing TrustedLen #42135
Labels
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Repro:
#42134 will fix this, but I wanted to record it because I think
TrustedLen
being anunsafe trait
means this could be leading to unsoundness.The text was updated successfully, but these errors were encountered: