]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: pin-init: internal: move alignment check to `make_field_check`
authorGary Guo <gary@garyguo.net>
Mon, 27 Apr 2026 15:43:00 +0000 (16:43 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 30 Apr 2026 20:43:28 +0000 (22:43 +0200)
commit83ac2870310b694775ab7e8f0244fdd94fc21926
tree6b534fecbf80433e046b295aabaa9308db10eecd
parentba6b328588f7cb7cf4aca33bae565c2914d74786
rust: pin-init: internal: move alignment check to `make_field_check`

Instead of having the reference creation serving dual-purpose as both for
let bindings and alignment check, detangle them so that the alignment check
is done explicitly in `make_field_check`. This is more robust against
refactors that may change the way let bindings are created.

Cc: stable@vger.kernel.org
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260427-pin-init-fix-v3-1-496a699674dd@garyguo.net
[ Reworded for typo. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/pin-init/internal/src/init.rs