Currently labels are positioned in the text buffer using a Range<L>.
This means it's impossible to represent a label that runs until the end of the text buffer of length L::MAX, because of wraparound.
I also don't see the point of modelling a zero-width span, so RangeInclusive seems like a much tighter fit for this use-case.
We can make invalid states unrepresentable, here.
Currently labels are positioned in the text buffer using a
Range<L>.This means it's impossible to represent a label that runs until the end of the text buffer of length
L::MAX, because of wraparound.I also don't see the point of modelling a zero-width span, so
RangeInclusiveseems like a much tighter fit for this use-case.We can make invalid states unrepresentable, here.