Skip to content

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

Description

@jyn514

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions