-
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
Add range notation #19794
Comments
Slight change of plan, the range structs have an |
This means |
Why would we need an |
Yeah, that makes sense. It means we can't iterate over |
I'm implementing syntax for Range and RangeFrom, depending on how RFCs rust-lang/rfcs#520 and rust-lang/rfcs#498 work out, we might need to add support for RangeTo later. |
Closes #19794 r? @aturon for the first patch r? @nikomatsakis for the rest
Add first class ranges:
start..end
,start..
, and (implicitly) a whole range represented by a structFullRange
. The first two desugar toRange
andRangeFrom
structs, which implementIterator
and so allow, for example,for i in 2i..10 { }
.The text was updated successfully, but these errors were encountered: