Re: [PATCH 1/3] rust: assertions: add static_assert

2025-03-22 Thread Philippe Mathieu-Daudé
On 20/3/25 14:32, Peter Maydell wrote: From: Paolo Bonzini 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 p

Re: [PATCH 1/3] rust: assertions: add static_assert

2025-03-20 Thread Zhao Liu
On Thu, Mar 20, 2025 at 01:32:46PM +, Peter Maydell wrote: > Date: Thu, 20 Mar 2025 13:32:46 + > From: Peter Maydell > Subject: [PATCH 1/3] rust: assertions: add static_assert > X-Mailer: git-send-email 2.43.0 > > From: Paolo Bonzini > > Add a new assertion t

[PATCH 1/3] rust: assertions: add static_assert

2025-03-20 Thread Peter Maydell
From: Paolo Bonzini 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-