# Pre-RFC: Fixing Range by 2027

**URL:** https://internals.rust-lang.org/t/pre-rfc-fixing-range-by-2027/19936
**Category:** language design
**Created:** [November 27, 2023, 11:43pm UTC](https://internals.rust-lang.org/t/pre-rfc-fixing-range-by-2027/19936 "2023-11-27T23:43:33Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![jdahlstrom](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/jdahlstrom/32/3351_2.png) [@jdahlstrom](https://internals.rust-lang.org/u/jdahlstrom)
#### Post date: [November 28, 2023, 9:15am UTC](https://internals.rust-lang.org/t/pre-rfc-fixing-range-by-2027/19936/8 "2023-11-28T09:15:35Z")

</div>

> [@pitaj](#):
>
> The `RangeFrom` iterator should probably also have an `exhausted` field so you can do this without hitting a debug overflow panic:

I think at least some people (strongly?) feel that `RangeFrom` is meant be infinite and never return `None` by definition, and the current overflow behavior is the expected one (and as such you’re always supposed to `take` etc to make it finite). My own intuition was that `RangeFrom` would indeed stop at `T::MAX` if `T` does have a maximum and I was slightly surprised that it does overflow instead. But on the other hand it _is_ consistent that the `Step` impl simply does whatever `+= 1` does.

(Maybe it could be useful to have `.wrapping()`, `.saturating()` and `.checked()` adapter methods? Probably too niche.)

---

_[View the full topic](https://internals.rust-lang.org/t/pre-rfc-fixing-range-by-2027/19936)._
