Skip to content

Commit

Permalink
Add parentheses to avoid (re)parsing ambiguity in test_vsri macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardosm authored and Amanieu committed Oct 2, 2023
1 parent 8d2b298 commit 61e13f8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ macro_rules! test_vsli {
let a = [$($a as $t),*];
let b = [$($b as $t),*];
let n_bit_mask: $t = (1 << $n) - 1;
let e = [$(($a as $t & n_bit_mask) | ($b as $t << $n)),*];
let e = [$(($a as $t & n_bit_mask) | (($b as $t) << $n)),*];
let r = $fn_id::<$n>(transmute(a), transmute(b));
let mut d = e;
d = transmute(r);
Expand Down Expand Up @@ -60,7 +60,7 @@ macro_rules! test_vsri {
unsafe fn $test_id() {
let a = [$($a as $t),*];
let b = [$($b as $t),*];
let n_bit_mask = ((1 as $t << $n) - 1).rotate_right($n);
let n_bit_mask = (((1 as $t) << $n) - 1).rotate_right($n);
let e = [$(($a as $t & n_bit_mask) | (($b as $t >> $n) & !n_bit_mask)),*];
let r = $fn_id::<$n>(transmute(a), transmute(b));
let mut d = e;
Expand Down

0 comments on commit 61e13f8

Please sign in to comment.