-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Replace _, _
with ..
in patterns
#36203
Conversation
r? @nrc (This is a formatting/style kind of PR and |
@bors: r+ |
📌 Commit 15dd493 has been approved by |
☔ The latest upstream changes (presumably #35761) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=nrc |
📌 Commit e4bff3d has been approved by |
☔ The latest upstream changes (presumably #35957) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=nrc |
📌 Commit e05e74a has been approved by |
Replace `_, _` with `..` in patterns This is how #33627 looks in action. Looks especially nice in leftmost/rightmost positions `(first, ..)`/`(.., last)`. I haven't touched libsyntax intentionally because the feature is still unstable.
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: #36203 Closes #33627 r? @nikomatsakis
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: #36203 Closes #33627 r? @nikomatsakis
This is how #33627 looks in action.
Looks especially nice in leftmost/rightmost positions
(first, ..)
/(.., last)
.I haven't touched libsyntax intentionally because the feature is still unstable.