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

single_match_else - single expr/stmt else block corner case #5771

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

tnielens
Copy link
Contributor

@tnielens tnielens commented Jul 6, 2020

One approach to fix #3489.
See discussion in the issue.

changelog: single_match_else - single expr/stmt else block corner case fix

@rust-highfive
Copy link

r? @matthiaskrgr

(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 Jul 6, 2020
Comment on lines 42 to 55
// don't lint here
match Some(1) {
Some(a) => println!("${:?}", a),
None => return,
}

// don't lint here
match Some(1) {
Some(a) => println!("${:?}", a),
None => return,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah my bad, this is supposed to be the {return} case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know now, forgot to skip rustfmt on those cases.

@matthiaskrgr
Copy link
Member

Thanks, can you please run rustfmt? I see some trailing whitespaces.

@tnielens
Copy link
Contributor Author

tnielens commented Jul 9, 2020

Thanks, can you please run rustfmt? I see some trailing whitespaces.

cargo dev fmt did modify anything. I spotted two trailing spaces on comments which I removed.

@matthiaskrgr
Copy link
Member

cargo dev fmt did modify anything.

That's strange.
In theory cargo fmt --all should also work in most cases (but it will skip tests I think).

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 9, 2020

📌 Commit dac19e3 has been approved by matthiaskrgr

@bors
Copy link
Collaborator

bors commented Jul 9, 2020

⌛ Testing commit dac19e3 with merge 45eea9a...

@bors
Copy link
Collaborator

bors commented Jul 9, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: matthiaskrgr
Pushing 45eea9a to master...

@bors bors merged commit 45eea9a into rust-lang:master Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FN single_match_else
4 participants