syntax: recover trailing | in or-patterns by Centril · Pull Request #64887 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation7 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Centril

Fixes #64879.

For example (this also shows that we are sensitive to the typo ||):

error: a trailing `|` is not allowed in an or-pattern
  --> $DIR/remove-leading-vert.rs:33:11
   |
LL |         A || => {}
   |         - ^^ help: remove the `||`
   |         |
   |         while parsing this or-pattern starting here
   |
   = note: alternatives in or-patterns are separated with `|`, not `||`

r? @estebank

estebank

@Centril

Added token::Colon as well for type ascription and improved the test coverage.

@Centril

@estebank

@bors

📌 Commit 3eba6c1 has been approved by estebank

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Oct 1, 2019

Centril added a commit to Centril/rust that referenced this pull request

Oct 1, 2019

@Centril

…tebank

syntax: recover trailing | in or-patterns

Fixes rust-lang#64879.

For example (this also shows that we are sensitive to the typo ||):

error: a trailing `|` is not allowed in an or-pattern
  --> $DIR/remove-leading-vert.rs:33:11
   |
LL |         A || => {}
   |         - ^^ help: remove the `||`
   |         |
   |         while parsing this or-pattern starting here
   |
   = note: alternatives in or-patterns are separated with `|`, not `||`

r? @estebank

Centril added a commit to Centril/rust that referenced this pull request

Oct 1, 2019

@Centril

…tebank

syntax: recover trailing | in or-patterns

Fixes rust-lang#64879.

For example (this also shows that we are sensitive to the typo ||):

error: a trailing `|` is not allowed in an or-pattern
  --> $DIR/remove-leading-vert.rs:33:11
   |
LL |         A || => {}
   |         - ^^ help: remove the `||`
   |         |
   |         while parsing this or-pattern starting here
   |
   = note: alternatives in or-patterns are separated with `|`, not `||`

r? @estebank

bors added a commit that referenced this pull request

Oct 1, 2019

@bors

Rollup of 10 pull requests

Successful merges:

Failed merges:

r? @ghost

@Centril Centril deleted the recover-trailing-vert branch

October 1, 2019 11:55

Labels

F-or_patterns

`#![feature(or_patterns)]`

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.