mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 00:56:14 +00:00
300b821d51
Warn on structs with a trailing zero-sized array but no `repr` attribute Closes #2868 changelog: Implement ``[`trailing_empty_array`]``, which warns if a struct is defined where the last field is a zero-sized array but there are no `repr` attributes. Zero-sized arrays aren't very useful in Rust itself, so such a struct is likely being created to pass to C code or in some other situation where control over memory layout matters. Either way, a `repr` attribute is needed. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |