Skip to content
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

simplify match stmt #70424

Merged
merged 1 commit into from
Mar 26, 2020
Merged

simplify match stmt #70424

merged 1 commit into from
Mar 26, 2020

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Mar 26, 2020

We actually have a surprising amount of

match expr {
    $($p:pat)|+ => true,
    _ => false,
}

While I would prefer this to be replaced with matches!, most cases are
fairly readable anyway so we can just let them be for now.

@rust-highfive
Copy link
Collaborator

r? @cramertj

(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 Mar 26, 2020
@Centril
Copy link
Contributor

Centril commented Mar 26, 2020

r? @Centril @bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 26, 2020

📌 Commit c21e25c has been approved by Centril

@rust-highfive rust-highfive assigned Centril and unassigned cramertj Mar 26, 2020
@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 Mar 26, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 26, 2020
simplify match stmt

We actually have a surprising amount of
```rust
match expr {
    $($p:pat)|+ => true,
    _ => false,
}
```
While I would prefer this to be replaced with `matches!`, most cases are
fairly readable anyway so we can just let them be for now.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 26, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#68004 (permit negative impls for non-auto traits)
 - rust-lang#70385 (Miri nits: comment and var name improvement)
 - rust-lang#70411 (Fix for rust-lang#62691: use the largest niche across all fields)
 - rust-lang#70417 (parser: recover on `...` as a pattern, suggesting `..`)
 - rust-lang#70424 (simplify match stmt)

Failed merges:

r? @ghost
@bors bors merged commit 608715b into rust-lang:master Mar 26, 2020
@lcnr lcnr deleted the nit branch June 29, 2020 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

5 participants