Uh oh!
There was an error while loading. Please reload this page.
Support parentheses in patterns under feature gate - #48500
Conversation
rust-highfive
commented
Feb 24, 2018
(rust_highfive has picked a reviewer for you, use r? to override) |
petrochenkov
commented
Feb 24, 2018
cc @rust-lang/lang |
petrochenkov
commented
Feb 24, 2018
Also related to #48501 |
bors
commented
Feb 25, 2018
☔ The latest upstream changes (presumably #48520) made this pull request unmergeable. Please resolve the merge conflicts. |
Indeed, I see no reason not to permit |
nikomatsakis
left a comment
There was a problem hiding this comment.
r=me with nits addressed
There was a problem hiding this comment.
Nit: I'd prefer a name like parse_pat_parenthesized_list. Also, a comment explaining this would be nice. Something like:
Parses a parenthesized list of patterns like (), (p), (p,), (p, q), or (p, q, ..). Returns a vector of the subpatterns that were parsed, along with (a) an option indicating the index of the .. element and (b) a boolean indicating whether a trailing comma was present. Trailing commas are significant because (p) and (p,) are different patterns.
Improve recovery for trailing comma after `..`
petrochenkov
commented
Feb 28, 2018
@bors r=nikomatsakis |
bors
commented
Feb 28, 2018
📌 Commit c9aff92 has been approved by |
bors
commented
Feb 28, 2018
🌲 The tree is currently closed for pull requests below priority 200, this pull request will be tested once the tree is reopened |
Support parentheses in patterns under feature gate This is a prerequisite for any other extensions to pattern syntax - `|` with multiple patterns, type ascription, `..PAT` in slice patterns. Closesrust-lang/rfcs#554
This is a prerequisite for any other extensions to pattern syntax -
|with multiple patterns, type ascription,..PATin slice patterns.Closesrust-lang/rfcs#554