mirror of
https://github.com/rust-lang/rust.git
synced 2026-07-28 02:22:18 -04:00
a2cc15f20e
cmse: clear variant-dependent padding in `enum`s tracking issue: https://github.com/rust-lang/rust/issues/81391 tracking issue: https://github.com/rust-lang/rust/issues/75835 Since https://github.com/rust-lang/rust/pull/157397 we clear variant-independent padding, bytes that are padding for all valid values of the type. This PR extends that idea to also clear variant-dependent padding, where we have to check what variant a (nested) enum has to determine which bytes are padding so we can clear them. With these changes the lint from https://github.com/rust-lang/rust/pull/147697 can lint on just `union`s. r? @davidtwco cc @RalfJung @Jules-Bertholet
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.