-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-maybe-future-editionSomething we may consider for a future edition.Something we may consider for a future edition.B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.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 RFCF-new_range`#![feature(new_range)]``#![feature(new_range)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.S-tracking-needs-documentationStatus: Needs documentation.Status: Needs documentation.S-tracking-needs-migration-lintStatus: This item needs a migration lint.Status: This item needs a migration lint.S-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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.
Description
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:
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
- Implement new types in nightly.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
- Stabilize new range types (in all editions).
- Implement lang changes in nightly as an unstable feature. Implement unstable
new_range
feature #136167 - Enable 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.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - Add documentation to the reference.
- See the instructions.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - Add documentation to the edition guide.
- N/A: Add formatting for new syntax to the style guide.
- See the nightly style procedure.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - Ensure ready for release of new edition.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
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).To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Related
cc @pitaj
Expurple, yerke, elenakrittik, branpk, joseluis and 20 moreMolotovCherry, net, viliml and EvansJahja
Metadata
Metadata
Assignees
Labels
A-maybe-future-editionSomething we may consider for a future edition.Something we may consider for a future edition.B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.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 RFCF-new_range`#![feature(new_range)]``#![feature(new_range)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.S-tracking-needs-documentationStatus: Needs documentation.Status: Needs documentation.S-tracking-needs-migration-lintStatus: This item needs a migration lint.Status: This item needs a migration lint.S-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
orlp commentedon May 26, 2024
To see which iterator methods we may want to add to the new ranges, I did an informal search on
Github using the following query:
I matched on anything that looks like
( <> .. <> )
or( <> ..= <> )
that is not immediatelypreceded by some identifier character, to avoid matching things like
vec.drain(..).map(_)
.Example for
map
: search.This isn't perfect but captures a rough amount of usage. Just looking by the number of matches:
map
: 65.8krev
: 23.2kcollect
: 9.9kfor_each
: 8.5kstep_by
: 8.3kfilter
: 8.2kflat_map
: 4.2kfold
: 3.5kzip
: 3.4kfilter_map
: 1.6kfind
: 1.5kchain
: 1.4ktake_while
: 1.1kall
: 1.1kcycle
: 0.7kenumerate
: 0.6kscan
: 0.4kproduct
: 0.4kfind_map
: 0.3kany
: 0.3ksum
: 0.2ktake
: 0.2kskip
: 0.1ktry_*
: 0.1kmin*
: 0.1kmax*
: 0.1kmap_while
: 0.1kposition
: 0.1kskip_while
: 0.1kcount
: 0.1kreduce
: 0.1knth
: 0.1kunzip
: 0I personally think
filter
is a decent cut-off, which gives the inherent methodsmap
,rev
,collect
,for_each
,step_by
,filter
.pitaj commentedon May 26, 2024
orlp commentedon May 26, 2024
@pitaj Nope, just a clerical error. I fixed it.
programmerjake commentedon May 26, 2024
31 remaining items
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
implement unstable `new_range` feature
Rollup merge of rust-lang#136167 - pitaj:new_range, r=Nadrieril