-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Implement ..
syntax for RangeFull as expression
#21947
Conversation
Allows the expression `..` (without either endpoint) in general, can be used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`. The old syntax &expr[] is not yet removed or warned for.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
We need a snapshot before we can implement the next step of converting all uses of I don't know if it's too weird to add the deprecation message commented out like that, I could remove that code entirely. |
⌛ Testing commit 7523914 with merge 5e306de... |
💔 Test failed - auto-mac-64-opt |
Update tests to change all `&expr[]` to `&expr[..]` to make sure pretty printing passes.
Thanks for the review! I didn't think about the pretty tests, I've fixed that now. |
@bors: r+ 7d52 |
Implement step 1 of rust-lang/rfcs#702 Allows the expression `..` (without either endpoint) in general, can be used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`. The old syntax &expr[] is not yet removed or warned for.
Implement step 1 of rust-lang/rfcs#702
Allows the expression
..
(without either endpoint) in general, can beused in slicing syntax
&expr[..]
where we previously wrote&expr[]
.The old syntax
&expr[]
is not yet removed or warned for, but will be removed later.