Should we have it?
The obvious answer is yes. After all,
Range<char> is strictly smaller, so it should fit into
The reality is, as always, more complicated.
Range<u32> should not be
(0..=u32::MAX).len() will overflow on 16 bit systems where
usize = u16. The same argument applies to
Range<char>, so, strictly,
Range<char> should not be
The difference with
Range<u32> is that it's been
ExactSizeIterator since 1.0.0, so removing it would be breaking. With
Range<char>, we can choose to do the "correct" thing, or the convenient thing pointing to the precident of
(Note that this also applies to