-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for new_range_api (part of RFC 3550) #125687
Copy link
Copy link
Open
0 / 10 of 1 issue completedLabels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Accepted RFC
View all comments
Feature gate:
#![feature(new_range_api)]This is a tracking issue for the library additions that are part of RFC 3550: New range types
Tracking issue for the language change: #123741
This feature introduces new types implementing
CopyandIntoIteratorthat are meant to replace the legacy range types, which are!Copyand implementIteratordirectly.Public API
See the RFC for more details.
Steps / History
new_range_apifor RFC 3550 #125751endfield tolastUnresolved Questions
IterRangeFromoverflow panic only after yielding the maximum value, without impacting release mode Useoverflow_checksintrinsic soIterRangeFromyields MAX before panicking in debug #148703IterRangeInclusivenow that it is not bound by the API constraints of legacyRangeInclusive?Iteratorpresent on the new range types (Decide which methods to add to newRangetypes #125589)std::ops::range::instead?IterRange,IterRangeInclusiveor justIter,IterInclusive? OrRangeIter,RangeInclusiveIter, ...? library: RenameIterRange*toRange*Iter#149547RangeBounds) also be moved under therangemodule?RangeFromeven implementIntoIterator, or should it require an explicit.iter()call? Using it as an iterator can be a footgun, usually people wantstart..=MAXinstead. Also, it is inconsistent withRangeTo, which doesn't implementIntoIteratoreither. But, it's extremely useful forit.zip(1..)range.by_ref().next().RangeInclusive?Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩