Skip to content

Add range notation #19794

Description

@nrc

Add first class ranges: start..end, start.., and (implicitly) a whole range represented by a struct FullRange. The first two desugar to Range and RangeFrom structs, which implement Iterator and so allow, for example, for i in 2i..10 { }.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions