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
Assist idea: extract enum variant to struct #4468
Labels
Comments
Yup, we should totally steal this from IntelliJ :D |
I will look into that :-) |
Created a PR for that: #4576 |
Status: this works for tuple variants, but is still not implemented for record variants. Current code is here: https://github.com/rust-analyzer/rust-analyzer/blob/ca31b1d63ae91a69f1ce9c0b075403834ba19f38/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs |
matklad
added
E-has-instructions
Issue has some instructions and pointers to code to get started
E-medium
labels
Jun 29, 2020
bors bot
added a commit
that referenced
this issue
Nov 4, 2020
6456: Support record variants in extract_struct_from_enum_variant r=matklad a=Veykril As requested :) This also prevents the assist from being disabled if a definition in the value namespace exists with the same name as our new struct since that won't cause a collision #4468 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
I think this can be closed, right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
(and back)
The text was updated successfully, but these errors were encountered: