Rust: Tracking issue for RFC 2102, "Unnamed fields of struct and union type"

Created on 9 Apr 2018  路  5Comments  路  Source: rust-lang/rust

This is a tracking issue for the RFC "Unnamed fields of struct and union type" (rust-lang/rfcs#2102).

Steps:

B-RFC-approved C-tracking-issue E-help-wanted T-lang

Most helpful comment

Looks like this still needs an implementation

All 5 comments

@Centril Regarding unresolved questions: the first three paragraphs in that section are just talking about the future possibility of full unnamed types that can appear everywhere, which would be the subject of a future RFC. The last paragraph talks about other future possibilities that also need their own RFCs.

@joshtriplett Yeah; that was also my interpretation, so ==> no unresolved questions?

Looks like this still needs an implementation

I think It, I hope it helps

RFC #2870

think it would be better that way

let unamedstruct: { count: i32, price: f64, type: u8 } = { count: 500, price: 6.4, type: 1 };

or

let unamedstruct: Struct = { count: 500, price: 6.4, type: 1 };

or simply

let unamedstruct = { count: 500, price: 6.4, type: 1 };

nothing to do with tuples, starting with tuples having no named elements, structs yes

@cindRoberta That's an unrelated proposal. This RFC is about unnamed fields within other types, not fully general anonymous types.

Was this page helpful?
0 / 5 - 0 ratings