You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust gained a union type in 1.19.0. libc wraps many C unions poorly, usually by pretending they're structs and ignoring some fields. For example, https://github.com/rust-lang/libc/blob/master/src/unix/mod.rs#L156 . libc should update all of these to use the correct union types before release 1.0. It should be fairly easy to find them all, because all of them are listed as exclusions in libc-test/build.rs.
The text was updated successfully, but these errors were encountered:
For new types we can start using unions but we unfortunately can't redefine existing types to use unions because accessing their fields are unsafe. It'd be good to get an idea of what changes could actually be made (backwards compatibly) before resolving the question of whether we're ready for a new version requirement or not.
I guess we can replace existing structs with real unions. Just that it would be a breaking change, needing a major version bump?
I hope all types that represent unions are going to be implemented as unions before libc 1.0? The current representations feels like hacks that were basically just waiting for Rust 1.19?
Rust gained a union type in
1.19.0
. libc wraps many C unions poorly, usually by pretending they're structs and ignoring some fields. For example, https://github.com/rust-lang/libc/blob/master/src/unix/mod.rs#L156 . libc should update all of these to use the correct union types before release 1.0. It should be fairly easy to find them all, because all of them are listed as exclusions in libc-test/build.rs.The text was updated successfully, but these errors were encountered: