Skip to content

Allow empty functional updating of structs #8972

@tikue

Description

@tikue
struct Foo {
    bar: int,
    baz: int
}

let foo = Foo {
    bar: 0,
    baz: 1
};

let foo_clone = Foo { ..foo }; // error

As @metajack pointed out, this would be useful to avoid special-casing in macros and the like.

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