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

Fix semicolon insertion in match_single_binding #10470

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

Alexendoo
Copy link
Member

changelog: [match_single_binding]: Fix missing semicolon after the suggestion

Fixes #10447

Also fixes an edge case for unit returning macros in expression contexts:

f(match 1 {
    _ => println!("foo"),
});

would suggest

f(println!("foo"););

@rustbot
Copy link
Collaborator

rustbot commented Mar 9, 2023

r? @giraffate

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 9, 2023
@bors
Copy link
Collaborator

bors commented Mar 11, 2023

☔ The latest upstream changes (presumably #10434) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

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

Overall looks good, thanks!

Can the conflicts be resolved?

@Alexendoo Alexendoo force-pushed the match-single-binding-semicolon branch from cb9fb76 to 555f568 Compare March 13, 2023 14:18
@Alexendoo
Copy link
Member Author

Woops, I saw that and then forgot about it. Rebased thanks

@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Mar 13, 2023

📌 Commit 555f568 has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Mar 13, 2023

⌛ Testing commit 555f568 with merge 945e42f...

@bors
Copy link
Collaborator

bors commented Mar 13, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 945e42f to master...

@bors bors merged commit 945e42f into rust-lang:master Mar 13, 2023
@Alexendoo Alexendoo deleted the match-single-binding-semicolon branch March 13, 2023 15:26
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.

match_single_binding should ommit entire statement instead of suggestion broken "()" ?
4 participants