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

Use unions to represent unions #557

Open
Invisible-Rabbit-Hunter opened this issue Jan 14, 2018 · 7 comments
Open

Use unions to represent unions #557

Invisible-Rabbit-Hunter opened this issue Jan 14, 2018 · 7 comments
Labels
waiting for 0.4 This issue will be fixed in 0.4

Comments

@Invisible-Rabbit-Hunter
Copy link

Invisible-Rabbit-Hunter commented Jan 14, 2018

As rust has unions since 1.19, shouldn't the API use them, instead of structs?

@retep998
Copy link
Owner

winapi 0.3 supports Rust 1.6 and therefore is unable to use the newer union language feature. winapi 0.4 will upgrade the minimum Rust version and take advantage of new language features such as that.

@MSxDOS
Copy link
Contributor

MSxDOS commented Feb 2, 2018

winapi 0.4 will upgrade the minimum Rust version and take advantage of new language features such as that.

Can't wait, but that's not happening any time soon, am I right? It will take awhile for even untagged unions to reach stable Rust.

@Eh2406
Copy link
Contributor

Eh2406 commented Feb 2, 2018

They are stable in 1.19

@MSxDOS
Copy link
Contributor

MSxDOS commented Feb 2, 2018

Hmm, I mistook it for unions with non-Copy field then which currently require #![feature(untagged_unions)]

@retep998
Copy link
Owner

retep998 commented Feb 2, 2018

Everything in winapi is Copy so that's not a blocker.

@benpye
Copy link

benpye commented May 8, 2019

@retep998 Is there a timeline for 0.4 as unions have been in for some time now, nearly 2 years...

@MSxDOS
Copy link
Contributor

MSxDOS commented May 16, 2019

There are\were other blockers for 0.4 like procedural macros and const fn, and if rust-lang/rust#58713 is one of them then we may as well have to wait for another 2 years.

@retep998 retep998 added the waiting for 0.4 This issue will be fixed in 0.4 label Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for 0.4 This issue will be fixed in 0.4
Projects
None yet
Development

No branches or pull requests

5 participants