]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: move `static_assert` into `build_assert`
authorGary Guo <gary@garyguo.net>
Thu, 19 Mar 2026 12:16:45 +0000 (12:16 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Sat, 28 Mar 2026 22:16:52 +0000 (23:16 +0100)
commitabfe5ee9971249b91020b5053afcaad43837336a
tree12326a59ffa9cd56040be8c7dd99b25cfa6a61ba
parent4f13c93497e366cd8e41561a8e30ad4da887cb82
rust: move `static_assert` into `build_assert`

Conceptually, `static_assert` is also a build-time assertion that occurs
earlier in the pipeline. Consolidate the implementation so that we can use
this as the canonical place to add more useful build-time assertions.

Reviewed-by: Yury Norov <ynorov@nvidia.com>
Signed-off-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260319121653.2975748-2-gary@kernel.org
[ Used kernel vertical style. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/build_assert.rs
rust/kernel/lib.rs
rust/kernel/prelude.rs
rust/kernel/static_assert.rs [deleted file]