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

Switch to numeric fields in struct expressions #1271

Closed
dtolnay opened this issue May 20, 2018 · 0 comments
Closed

Switch to numeric fields in struct expressions #1271

dtolnay opened this issue May 20, 2018 · 0 comments

Comments

@dtolnay
Copy link
Member

dtolnay commented May 20, 2018

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.

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

No branches or pull requests

1 participant