Skip to content

Implement multiple patterns with | in if let and while let (RFC 2175) #48490

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 25, 2018

Conversation

petrochenkov
Copy link
Contributor

cc #48215

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 24, 2018
@petrochenkov petrochenkov changed the title Implement multiple patterns with | in if let and while let Implement multiple patterns with | in if let and while let (RFC 2175) Feb 24, 2018
@eddyb
Copy link
Member

eddyb commented Feb 24, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 24, 2018

📌 Commit 8640a51 has been approved by eddyb

@bors
Copy link
Collaborator

bors commented Feb 24, 2018

🌲 The tree is currently closed for pull requests below priority 99, this pull request will be tested once the tree is reopened

@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 Feb 24, 2018
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2018
Implement multiple patterns with `|` in `if let` and `while let` (RFC 2175)

cc rust-lang#48215
bors added a commit that referenced this pull request Feb 25, 2018
Rollup of 15 pull requests

- Successful merges: #47689, #48110, #48197, #48296, #48386, #48392, #48404, #48415, #48441, #48448, #48452, #48481, #48490, #48499, #48503
- Failed merges:
@bors bors merged commit 8640a51 into rust-lang:master Feb 25, 2018
@U007D
Copy link

U007D commented Mar 24, 2018

I'm not sure where to leave this comment, but I was puzzled by the fact that that the operator selected for this operation was the 'bitwise-or' operator (|) and not the 'logical or' (||) operator.

Has this issue already been covered somewhere?

@sinkuu
Copy link
Contributor

sinkuu commented Mar 25, 2018

@U007D
Wouldn't it be inconsistent if we had <pat> (|| <pat>)* syntax for let and <pat> (| <pat>)* for match? One of the motivations of RFC 2175 is " consistency with match."

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants