Repository: rust
Issue: Tracking Issue for RFC 3550: New range types
Labels: B-RFC-approved,T-lang,T-libs-api,C-tracking-issue,A-maybe-future-edition,S-tracking-impl-incomplete,S-tracking-unimplemented,S-tracking-needs-migration-lint,S-tracking-needs-documentation,F-new_range

This is a tracking issue for the RFC 3550: New range types

- https://github.com/rust-lang/rfcs/pull/3550

The feature gate for the issue is `#![feature(new_range)]`.

Tracking issue for the library change:

- https://github.com/rust-lang/rust/issues/125687

### About tracking issues

Tracking issues are used to record the overall progress of implementation.  They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.  A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.  Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

### Steps

- [x] Implement new types in nightly.
  - https://github.com/rust-lang/rust/pull/125751
- [ ] Stabilize new range types (in all editions).
- [ ] Implement lang changes in nightly for new edition.
- [ ] Implement migration lints.
- [ ] Crater run the lang changes and migration lints.
- [ ] Stabilize lang changes for new edition.
- [ ] Add documentation to the [dev guide][].
    - See the [instructions][doc-guide].
- [ ] Add documentation to the [reference][].
    - See the [instructions][reference-instructions].
- [ ] Add documentation to the [edition guide][].
- N/A: Add formatting for new syntax to the [style guide][].
    - See the [nightly style procedure][].
- [ ] Ensure ready for release of new edition.

[dev guide]: https://github.com/rust-lang/rustc-dev-guide
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs
[edition guide]: https://github.com/rust-lang/edition-guide
[nightly style procedure]: https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md
[reference]: https://github.com/rust-lang/reference
[reference-instructions]: https://github.com/rust-lang/reference/blob/master/CONTRIBUTING.md
[style guide]: https://github.com/rust-lang/rust/tree/master/src/doc/style-guide

### Unresolved Questions

- [ ] Will the migration cost make this feasible for either Rust 2024 or Rust 2027?
- [ ] How do we properly document and execute the ecosystem transition?
- [ ] How much time will it take to propagate this change throughout the ecosystem?
- [ ] What degree of ecosystem saturation would we be satisfied with?
- [ ] How much time do we need with stable library types before making the lang change?
- [ ] What about libraries that wish to maintain a certain MSRV?
- [ ] Taking into account all of the mitigations (diagnostics, migrations, and lints but NOT language-level changes), is the level of ecosystem disruption acceptable?
- [ ] What is expected of new libraries? Should they continue to support both sets of ranges or only the new ones?
- [ ] Will new Rust users need to learn about older editions because of downstream users of their code?
- [ ] "Would `#[cfg(overflow_checks)]` just magically work?" (see [here](https://github.com/rust-lang/rust/pull/125751#issuecomment-2171087470)).

### Related

- https://github.com/rust-lang/rust/issues/125687
- https://github.com/rust-lang/rust/pull/125751

cc @pitaj