Skip to content

Commit 6ed8d05

Browse files
committed
replace static_assert_imm5! with static_assert!
1 parent 2a1d6b8 commit 6ed8d05

File tree

1 file changed

+4
-4
lines changed
  • crates/core_arch/src/arm/neon

1 file changed

+4
-4
lines changed

crates/core_arch/src/arm/neon/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3548,7 +3548,7 @@ pub unsafe fn vsliq_n_s16<const N: i32>(a: int16x8_t, b: int16x8_t) -> int16x8_t
35483548
#[cfg_attr(test, assert_instr("vsli.32", n = 1))]
35493549
#[rustc_legacy_const_generics(2)]
35503550
pub unsafe fn vsli_n_s32<const N: i32>(a: int32x2_t, b: int32x2_t) -> int32x2_t {
3551-
static_assert_imm5!(N);
3551+
static_assert!(N: i32 where N >= 0 && N <= 31);
35523552
vshiftins_v2i32(a, b, int32x2_t(N, N))
35533553
}
35543554
/// Shift Left and Insert (immediate)
@@ -3558,7 +3558,7 @@ pub unsafe fn vsli_n_s32<const N: i32>(a: int32x2_t, b: int32x2_t) -> int32x2_t
35583558
#[cfg_attr(test, assert_instr("vsli.32", n = 1))]
35593559
#[rustc_legacy_const_generics(2)]
35603560
pub unsafe fn vsliq_n_s32<const N: i32>(a: int32x4_t, b: int32x4_t) -> int32x4_t {
3561-
static_assert_imm5!(N);
3561+
static_assert!(N: i32 where N >= 0 && N <= 31);
35623562
vshiftins_v4i32(a, b, int32x4_t(N, N, N, N))
35633563
}
35643564
/// Shift Left and Insert (immediate)
@@ -3648,7 +3648,7 @@ pub unsafe fn vsliq_n_u16<const N: i32>(a: uint16x8_t, b: uint16x8_t) -> uint16x
36483648
#[cfg_attr(test, assert_instr("vsli.32", n = 1))]
36493649
#[rustc_legacy_const_generics(2)]
36503650
pub unsafe fn vsli_n_u32<const N: i32>(a: uint32x2_t, b: uint32x2_t) -> uint32x2_t {
3651-
static_assert_imm5!(N);
3651+
static_assert!(N: i32 where N >= 0 && N <= 31);
36523652
transmute(vshiftins_v2i32(transmute(a), transmute(b), int32x2_t(N, N)))
36533653
}
36543654
/// Shift Left and Insert (immediate)
@@ -3658,7 +3658,7 @@ pub unsafe fn vsli_n_u32<const N: i32>(a: uint32x2_t, b: uint32x2_t) -> uint32x2
36583658
#[cfg_attr(test, assert_instr("vsli.32", n = 1))]
36593659
#[rustc_legacy_const_generics(2)]
36603660
pub unsafe fn vsliq_n_u32<const N: i32>(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t {
3661-
static_assert_imm5!(N);
3661+
static_assert!(N: i32 where N >= 0 && N <= 31);
36623662
transmute(vshiftins_v4i32(
36633663
transmute(a),
36643664
transmute(b),

0 commit comments

Comments
 (0)