-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement assist "Reorder field names" #3925
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
Conversation
6f92f7f to
730a927
Compare
| } | ||
|
|
||
| fn struct_definition(path: &ast::Path, sema: &Semantics<RootDatabase>) -> Option<Struct> { | ||
| match sema.resolve_path(path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally this should use variant_resolutions and not just resolve_paths, but it's not clear how to best expose this API for an IDE, so I guess this is ok as an initial impl
|
bors try (looks like CI is failing?) |
tryBuild failed |
|
bors r+ |
|
Indeed, I had not generated the documentation after adding the doc comment. |
Build succeeded |
This PR implements the "Reorder record fields" assist as discussed in issue #3821 .
Adding a
RecordFieldPatvariant to thePatenum seemed like the easiest way to handle theRecordPatchildren as a single sequence of elements, maybe there is a better way ?