Skip to content

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

@jyn514

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions