I tried to make use of it in this PR, but was unsuccessful:
Out of curiosity, I started looking through rust to see if it’s ever actually used. And I found lots of things like
But not a single case of something actually using the upper bound. (There were lots of passing it along or validity-checking it, but never doing something useful with it.)
The lower bound is used to guide allocations for collecting. I don’t know why this is, I’d guess to avoid massive overallocations when the upper bound is far too vague.
The higher bound is used in TrustedLen, but then, its the same value as the lower bound in that case.