-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue for RFC 3550: New range types #123741
Comments
To see which iterator methods we may want to add to the new ranges, I did an informal search on
I matched on anything that looks like Example for This isn't perfect but captures a rough amount of usage. Just looking by the number of matches:
I personally think |
This comment was marked as resolved.
This comment was marked as resolved.
@pitaj Nope, just a clerical error. I fixed it. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Let's continue that discussion about which methods to add in a separate issue here rather than on the tracking issue. |
Add `new_range_api` for RFC 3550 Initial implementation for rust-lang#125687 This includes a `From<legacy::RangeInclusive> for RangeInclusive` impl for convenience, instead of the `TryFrom` impl from the RFC. Having `From` is highly convenient and the debug assert should find almost all misuses. This includes re-exports of all existing `Range` types under `core::range`, plus the range-related traits (`RangeBounds`, `Step`, `OneSidedRange`) and the `Bound` enum. Currently the iterators are just wrappers around the old range types. Tracking issues: - rust-lang#123741 - rust-lang#125687
Rollup merge of rust-lang#125751 - pitaj:new_range_api, r=jhpratt Add `new_range_api` for RFC 3550 Initial implementation for rust-lang#125687 This includes a `From<legacy::RangeInclusive> for RangeInclusive` impl for convenience, instead of the `TryFrom` impl from the RFC. Having `From` is highly convenient and the debug assert should find almost all misuses. This includes re-exports of all existing `Range` types under `core::range`, plus the range-related traits (`RangeBounds`, `Step`, `OneSidedRange`) and the `Bound` enum. Currently the iterators are just wrappers around the old range types. Tracking issues: - rust-lang#123741 - rust-lang#125687
@rustbot labels -A-edition-2024 +A-maybe-future-edition -S-tracking-at-risk This is, unfortunately, not likely to have all the pieces in place in time to ship with the Rust 2024 edition, so we're going to drop the label. Thanks to all those who have been working on this, and we hope to see this ship in a future edition. |
What things are missing so far? |
See the issue description above. We need to check off all of those boxes in order to land this in any edition. |
This is a tracking issue for the RFC 3550: New range types
The feature gate for the issue is
#![feature(new_range)]
.Tracking issue for the library change:
new_range_api
(part of RFC 3550) #125687About 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
new_range_api
for RFC 3550 #125751Unresolved Questions
#[cfg(overflow_checks)]
just magically work?" (see here).Related
new_range_api
(part of RFC 3550) #125687new_range_api
for RFC 3550 #125751cc @pitaj
The text was updated successfully, but these errors were encountered: