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

fixed => () to => {} #4226

Merged
merged 2 commits into from
Jun 2, 2020
Merged

fixed => () to => {} #4226

merged 2 commits into from
Jun 2, 2020

Conversation

lukebhan
Copy link
Contributor

@lukebhan lukebhan commented Jun 2, 2020

Sorry, for making a new pull request but there were alot of new changes in the past day or so to the structure and I didn't want to go through merge conflicts. This fixes issue #4065. It also leaves it so that match_trailing_comma will still have a comma if left to true (this was the change requested on the previous pr)

@topecongiro topecongiro merged commit 9549c3b into rust-lang:master Jun 2, 2020
Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for the update!

@@ -15,7 +15,7 @@ fn main() {
let y = match (try {
foo()?
}) {
_ => (),
_ => {},
Copy link

Choose a reason for hiding this comment

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

Why does this have the , at the end while the others and others does not?

@@ -15,7 +15,7 @@ fn main() {
// Test case where first chain element isn't a path, but is shorter than
// the size of a tab.
x()
.y(|| match cond() { true => (), false => () });
.y(|| match cond() { true => {}, false => {}, });
Copy link

Choose a reason for hiding this comment

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

Do we need the extra , at the end?

@@ -16,7 +16,7 @@ fn main() {
// Test case where first chain element isn't a path, but is shorter than
// the size of a tab.
x()
.y(|| match cond() { true => (), false => () });
.y(|| match cond() { true => {} false => {} });
Copy link

Choose a reason for hiding this comment

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

Oh, I didn't know this is valid. TIL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants