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

Append new match arms rather than replacing all of them #3761

Merged
merged 4 commits into from
Mar 30, 2020

Conversation

mattyhall
Copy link
Contributor

This means we now retain comments when filling in match arms. This fixes #3687. This is my first contribution so apologies if it needs a rethink! I think in particular the way I find the position to append to and remove_if_only_whitespace are a little hairy.

crates/ra_syntax/src/ast/edit.rs Outdated Show resolved Hide resolved
crates/ra_syntax/src/ast/edit.rs Outdated Show resolved Hide resolved
crates/ra_syntax/src/ast/edit.rs Outdated Show resolved Hide resolved
@matklad
Copy link
Member

matklad commented Mar 30, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 30, 2020

@bors bors bot merged commit d2ea3f2 into rust-lang:master Mar 30, 2020
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Sep 25, 2024
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.

"Fill match arms" assist removes comments
4 participants