-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: Support exclusive_range_pattern #9780
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
Conversation
|
Note: There are some more unstable range patterns that are not supported yet as well, for instance, |
matklad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors d+
| p.bump(range_op); | ||
| atom_pat(p, recovery_set); | ||
| if !p.at(T![=>]) { | ||
| // not a range pat like `302 .. => ()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than leaving a comment here, better to split the tests:
if p.at(T![=>]) {
// test half_open_range_pat
// fn f() { let x .. = 1; }
} else {
atom_pat(p, recovery_set);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also found a bug with a test of that form! Fixed. Most likely would be seen in user code as if let 1.. = (...) which was not handled properly and is now.
|
✌️ lf- can now approve this pull request. To approve and merge a pull request, simply reply with |
|
@bors r+ |
|
bors r=matklad |
|
bors seems to have crashed earlier today so its stuck |
This comment has been minimized.
This comment has been minimized.
|
Already running a review |
37: Add both variants of half open range patterns to the grammar r=lf- a=lf- This is prompted by rust-lang/rust-analyzer#9779, but it is not actually a prerequisite of making that one happen as this commit doesn't change the generated code on the r-a side. Relevant PR (that does not require this one be merged immediately/a release made): rust-lang/rust-analyzer#9780 Co-authored-by: Jade <software@lfcode.ca>
37: Add both variants of half open range patterns to the grammar r=lf- a=lf- This is prompted by rust-lang/rust-analyzer#9779, but it is not actually a prerequisite of making that one happen as this commit doesn't change the generated code on the r-a side. Relevant PR (that does not require this one be merged immediately/a release made): rust-lang/rust-analyzer#9780 Co-authored-by: Jade <software@lfcode.ca>
37: Add both variants of half open range patterns to the grammar r=lf- a=lf- This is prompted by rust-lang#9779, but it is not actually a prerequisite of making that one happen as this commit doesn't change the generated code on the r-a side. Relevant PR (that does not require this one be merged immediately/a release made): rust-lang#9780 Co-authored-by: Jade <software@lfcode.ca>
37: Add both variants of half open range patterns to the grammar r=lf- a=lf- This is prompted by rust-lang/rust-analyzer#9779, but it is not actually a prerequisite of making that one happen as this commit doesn't change the generated code on the r-a side. Relevant PR (that does not require this one be merged immediately/a release made): rust-lang/rust-analyzer#9780 Co-authored-by: Jade <software@lfcode.ca>
Fix #9779