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

Renaming a struct initializer to match the field name should use shorthand record syntax #6548

Closed
jyn514 opened this issue Nov 14, 2020 · 0 comments · Fixed by #6552
Closed

Comments

@jyn514
Copy link
Member

jyn514 commented Nov 14, 2020

I have code like this:

let inner = unimplemented!();
Item { kind: inner, ..unimplemented!() }

When I rename inner to kind, I expect this to turn into Item { kind, ..unimplemented!() }.
Instead, it turns into Item { kind: kind, ..unimplemented!() }, and I have to hit ctrl+. again to get the short-hand syntax.

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 a pull request may close this issue.

1 participant