diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-21 11:25:21 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-21 12:51:16 +0100 |
commit | 9d116f42a38cb95a33da837e0b0b50d91e28906b (patch) | |
tree | 285a5d801eb54b715441aac14897ca505b704f53 /rust/qemu-api/src/bitops.rs | |
parent | 7bda68e8e2b0b836639557ddb13d761bdd15a104 (diff) | |
download | qemu-9d116f42a38cb95a33da837e0b0b50d91e28906b.zip qemu-9d116f42a38cb95a33da837e0b0b50d91e28906b.tar.gz qemu-9d116f42a38cb95a33da837e0b0b50d91e28906b.tar.bz2 |
rust: assertions: add static_assert
Add a new assertion that is similar to "const { assert!(...) }" but can be used
outside functions and with older versions of Rust. A similar macro is found in
Linux, whereas the "static_assertions" crate has a const_assert macro that
produces worse error messages.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20250321112523.1774131-2-peter.maydell@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/bitops.rs')
0 files changed, 0 insertions, 0 deletions