Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:orpat
Feb 25, 2018
Merged

Implement multiple patterns with | in if let and while let (RFC 2175)#48490
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:orpat

Conversation

@petrochenkov

Copy link
Copy Markdown
Contributor

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @eddyb

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

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

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Feb 24, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 8640a51 has been approved by eddyb

@bors

bors commented Feb 24, 2018

Copy link
Copy Markdown
Collaborator

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

@borsbors 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
@bors
bors merged commit 8640a51 into rust-lang:masterFeb 25, 2018
@U007D

Copy link
Copy Markdown

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
Copy Markdown
Contributor

@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."

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@petrochenkov@rust-highfive@eddyb@bors@U007D@sinkuu