Skip to content

Switch to numeric fields in struct expressions #1271

Closed
@dtolnay

Description

@dtolnay

This syntax was stabilized in Rust 1.19 with the intention of simplifying code generators that instantiate tuple structs. Tracking issue: rust-lang/rust#35626.

struct S(A, B, C);

let _ = S { 0: A, 1: B, 2: C };

When bumping our minimum required compiler version we will want to run through our Deserialize derive and see where this syntax would allow us to share more code between the struct and tuple struct code paths.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions