On Thu, Mar 20, 2025 at 01:32:46PM +0000, Peter Maydell wrote: > Date: Thu, 20 Mar 2025 13:32:46 +0000 > From: Peter Maydell <peter.mayd...@linaro.org> > Subject: [PATCH 1/3] rust: assertions: add static_assert > X-Mailer: git-send-email 2.43.0 > > From: Paolo Bonzini <pbonz...@redhat.com> > > 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.mayd...@linaro.org> > Supersedes: <20250320113356.799412-1-pbonz...@redhat.com> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > rust/qemu-api/src/assertions.rs | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+)
Reviewed-by: Zhao Liu <zhao1....@intel.com>