We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
x <= y - 1
x < y
static_assert_{u,s}imm_bits
1 parent 0043453 commit 2146a74Copy full SHA for 2146a74
crates/core_arch/src/macros.rs
@@ -21,7 +21,7 @@ macro_rules! static_assert_uimm_bits {
21
#[allow(unused_comparisons)]
22
{
23
static_assert!(
24
- 0 <= $imm && $imm <= (1 << $bits) - 1,
+ 0 <= $imm && $imm < (1 << $bits),
25
concat!(
26
stringify!($imm),
27
" doesn't fit in ",
@@ -37,7 +37,7 @@ macro_rules! static_assert_uimm_bits {
37
macro_rules! static_assert_simm_bits {
38
($imm:ident, $bits:expr) => {
39
40
- (-1 << ($bits - 1)) - 1 <= $imm && $imm <= (1 << ($bits - 1)) - 1,
+ (-1 << ($bits - 1)) - 1 <= $imm && $imm < (1 << ($bits - 1)),
41
42
43
0 commit comments