Skip to content

feat: Add a "Unmerge match arm" assist to split or-patterns inside match expressions #13145

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

Merged
merged 1 commit into from
Aug 30, 2022
Merged

feat: Add a "Unmerge match arm" assist to split or-patterns inside match expressions #13145

merged 1 commit into from
Aug 30, 2022

Conversation

ChayimFriedman2
Copy link
Contributor

Fixes #13072.

The way I implemented it it leaves the OrPat in place even if there is only one pattern now but I don't think something will break because of that, and when more code will be typed we'll parse it again anyway. Removing it (but keeping the child pattern) is hard, I don't know how to do that.

@jonas-schievink
Copy link
Contributor

Looks good to me, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Aug 30, 2022

📌 Commit 5f132e6 has been approved by jonas-schievink

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 30, 2022

⌛ Testing commit 5f132e6 with merge 989b09d...

@bors
Copy link
Contributor

bors commented Aug 30, 2022

☀️ Test successful - checks-actions
Approved by: jonas-schievink
Pushing 989b09d to master...

@bors bors merged commit 989b09d into rust-lang:master Aug 30, 2022
@ChayimFriedman2 ChayimFriedman2 deleted the unmerge-match-arm branch August 30, 2022 21:35
@lnicola
Copy link
Member

lnicola commented Sep 5, 2022

unmerge-map-arm.mp4

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

Successfully merging this pull request may close these issues.

Feature request: Add an assist to split or-patterns inside match expressions
4 participants