]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: rework `build_assert!` documentation
authorGary Guo <gary@garyguo.net>
Thu, 19 Mar 2026 12:16:47 +0000 (12:16 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 30 Mar 2026 00:03:52 +0000 (02:03 +0200)
commit889c8c934d175f55a3415abe5472c88a5612e89d
tree24504588c7d1db56aa5080395e86d9d7f49c5bdc
parent560a7a9b9267fbe31a68270ca0ad22b6a4db44a5
rust: rework `build_assert!` documentation

Add a detailed comparison and recommendation of the three types of
build-time assertion macro as module documentation (and un-hide the module
to render them).

The documentation on the macro themselves are simplified to only cover the
scenarios where they should be used; links to the module documentation is
added instead.

Reviewed-by: Yury Norov <ynorov@nvidia.com>
Signed-off-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260319121653.2975748-4-gary@kernel.org
[ Added periods on comments. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/build_assert.rs
rust/kernel/lib.rs