Skip to content

match match match match match - #59583

Merged
bors merged 1 commit into
rust-lang:masterfrom
oberien:patch-1
Mar 31, 2019
Merged

match match match match match#59583
bors merged 1 commit into
rust-lang:masterfrom
oberien:patch-1

Conversation

@oberien

@oberienoberien commented Mar 31, 2019

Copy link
Copy Markdown
Contributor

The match keyword can be chained as long as there are enough body-blocks following, and the output of one match will be the input of the next match.

I accidentally wrote something among the lines of this:

matchmatchOk(Some(1337)){Ok(val) => val,Err(err) => handle_err(err),}{Some(foo) => handle_foo(foo),None => {},}

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

(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 Mar 31, 2019
@Centril

Copy link
Copy Markdown
Contributor

Sure... why not... 😂 it is not a bad test actually.

r? @Centril@bors r+ rollup

@bors

bors commented Mar 31, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 55b7efe has been approved by Centril

@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 Mar 31, 2019
Centril added a commit to Centril/rust that referenced this pull request Mar 31, 2019
@CentrilCentril mentioned this pull request Mar 31, 2019
bors added a commit that referenced this pull request Mar 31, 2019
Rollup of 7 pull requests
Successful merges:
- #58805 (Lint for redundant imports)
- #59506 (Use platform dependent mcount function)
- #59519 (rustc_target: factor out common fields of non-Single Variants.)
- #59580 (Allow closure to unsafe fn coercion)
- #59581 (Stabilize refcell_replace_swap feature)
- #59583 (match match match match match)
- #59587 (Remove #[doc(hidden)] from Error::type_id)
Failed merges:
r? @ghost
@tesuji

tesuji commented Mar 31, 2019

Copy link
Copy Markdown
Contributor

A description explains why it exists or where the idea came from is better.

@Centril

Copy link
Copy Markdown
Contributor

Regardless this actually tests some good aspects of raw identifiers and match's syntax so it is fine to add.

@tesuji

Copy link
Copy Markdown
Contributor

That's a good explain. The PR owner could add that in PR description.

@bors
bors merged commit 55b7efe into rust-lang:masterMar 31, 2019
@oberien
oberien deleted the patch-1 branch March 31, 2019 21:55
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

@oberien@rust-highfive@Centril@bors@tesuji@nikomatsakis