Skip to content

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
Contributor

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
Contributor

bors commented Mar 13, 2023

📌 Commit 555f568 has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Mar 13, 2023

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

@bors
Copy link
Contributor

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