-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Stabilize inclusive range (..=
)
#47813
Conversation
|
See also: #45222 |
@leonardo-m The performance fix can be done independently from the stabilization I believe. |
Performance might depend on the data fields available, stabilizing public fields in the range inclusive iterator is restricting possibilities (to be factual). Having them not be iterators (but iterable) is an alternative, but the drawbacks of that are pretty clear from the original rust-lang/rfcs#1192, so it is not a good idea. |
The only way that it might be relevant is if we decided to change so that |
r? @nrc |
I think we need documentation before we can stabilise things nowadays, and according to the tracking issue we don't have any of that. |
@nrc:
The book and reference say they want to wait until stabilization, so are we entering deadlock 😂. |
Usually, the book and reference need a PR open, and then the stuff gets stabilized, and then they get merged. So we're still good :) |
@bors: r+ Thanks for the links! |
📌 Commit 570ffb2 has been approved by |
🔒 Merge conflict |
☔ The latest upstream changes (presumably #47998) made this pull request unmergeable. Please resolve the merge conflicts. |
570ffb2
to
2a0b5f9
Compare
Fixed merge conflict. Should this need any FCP? #28237 didn't go through a stabilization FCP yet. |
Edit: It doesn't matter because the issue is already reported. (#47950, I searched with |
I would be in favor of stabilizing, but I think we do need an FCP. @kennytm if you want to push this through, do you think you could write up a summary comment on the tracking issue #28237 ? In particular, I would like to see:
The idea is that people with minimal context should be able to quickly see what is being stabilized. It is not meant to rehash every argument (in particular, I don't think we have to go into the tortured history of choosing a particular sigil here). |
☔ The latest upstream changes (presumably #48017) made this pull request unmergeable. Please resolve the merge conflicts. |
📌 Commit 939cfa2 has been approved by |
⌛ Testing commit 939cfa2 with merge 5c375d69d2f600668849c42c9c7ba880bc38eefb... |
💔 Test failed - status-travis |
|
Stabilize inclusive range (`..=`) Stabilize the followings: * `inclusive_range` — The `std::ops::RangeInclusive` and `std::ops::RangeInclusiveTo` types, except its fields (tracked by #49022 separately). * `inclusive_range_syntax` — The `a..=b` and `..=b` expression syntax * `dotdoteq_in_patterns` — Using `a..=b` in a pattern cc #28237 r? @rust-lang/lang
☀️ Test successful - status-appveyor, status-travis |
is there docs for this? |
@jadbox do you mean like https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html ? Those have been around for a while now. |
Correct a few stability attributes * `const_indexing` language feature was stabilized in 1.26.0 by #46882 * `Display` impls for `PanicInfo` and `Location` were stabilized in 1.26.0 by #47687 * `TrustedLen` is still unstable so its impls should be as well even though `RangeInclusive` was stabilized by #47813 * `!Send` and `!Sync` for `Args` and `ArgsOs` were stabilized in 1.26.0 by #48005 * `EscapeDefault` has been stable since 1.0.0 so should continue to show that even though it was moved to core in #48735 This could be backported to beta like #49612
These were stabilized in March 2018's rust-lang#47813, and are the Preferred Way to Do It going forward (q.v. rust-lang#51043).
Stabilize the followings:
inclusive_range
— Thestd::ops::RangeInclusive
andstd::ops::RangeInclusiveTo
types, except its fields (tracked by Tracking issue forstart
,end
andnew
methods of RangeInclusive #49022 separately).inclusive_range_syntax
— Thea..=b
and..=b
expression syntaxdotdoteq_in_patterns
— Usinga..=b
in a patterncc #28237
r? @rust-lang/lang