Commit 0fa5f8c8 authored by Altan Ozlu's avatar Altan Ozlu Committed by Miguel Ojeda
Browse files

rust: static_assert: add optional message



Add an optional panic message to the `static_assert!` macro.

The panic message doesn't support argument formatting, because the
`assert!` macro only supports formatting in non-const contexts.

Suggested-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1149


Signed-off-by: default avatarAltan Ozlu <altan@ozlu.eu>
Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
Reviewed-by: default avatarTrevor Gross <tmgross@umich.edu>
Link: https://lore.kernel.org/r/20250326202520.1176162-2-altan@ozlu.eu


Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 79d04e73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment