Fix biguint assert_assign_op for rust 1.8

The `$op` only seems to be accepted when used indirectly through another
macro, in this case `assert_eq`.  How nice.
This commit is contained in:
Josh Stone 2017-09-19 14:00:51 -07:00
parent 98a3f17db6
commit 953087fe4e
1 changed files with 4 additions and 5 deletions

View File

@ -29,11 +29,10 @@ macro_rules! assert_assign_op {
($left:ident $op:tt $right:ident == $expected:expr) => {
{
let mut tmp12384 = $left.clone();
tmp12384 $op &$right;
assert_eq!(tmp12384, $expected);
tmp12384 = $left.clone();
tmp12384 $op $right.clone();
assert_eq!(tmp12384, $expected);
assert_eq!({ tmp12384 $op &$right; tmp12384}, $expected);
let mut tmp12384 = $left.clone();
assert_eq!({ tmp12384 $op $right.clone(); tmp12384}, $expected);
}
};
}