rust: static_assert: add optional message
Benno Lossin
Reviewed-byQuoted 8 lines · Altan Ozlu
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 Miguel Ojeda <[email protected]>Signed-off-by Altan Ozlu <[email protected]>
Reviewed-by Benno Lossin <[email protected]>
---
Cheers,
Benno
Quoted 5 lines
---
Link to v3: https://lore.kernel.org/rust-for-linux/[email protected]/--- rust/kernel/static_assert.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)