Hacker News new | past | comments | ask | show | jobs | submit login

Maybe there should be an annotation saying that the layout of a struct is important for ABI compatibility, and it would silence warnings related to the layout.



C FFI structs have to be marked `#[repr(C)]` to guarantee they'll be represented how C structs would be. It might be a reasonable change to implicitly allow dead fields on any struct with a C repr (since using the struct in C effectively makes all of its fields public).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: