This commit is contained in:
Oliver Schneider
2016-09-07 10:30:49 +02:00
parent f5a89d297c
commit ca703f619c
+3 -7
View File
@@ -49,8 +49,7 @@ macro_rules! int_binops {
BitOr => $v($l | $r),
// these have already been handled
Shl => bug!("`<<` operation should already have been handled"),
Shr => bug!("`>>` operation should already have been handled"),
Shl | Shr => bug!("`bin_op` operation should already have been handled", bin_op.to_hir_binop().as_str()),
Eq => Bool($l == $r),
Ne => Bool($l != $r),
@@ -72,11 +71,8 @@ macro_rules! float_binops {
Rem => $v($l % $r),
// invalid float ops
BitXor => bug!("`^` is not a valid operation on floats"),
BitAnd => bug!("`&` is not a valid operation on floats"),
BitOr => bug!("`|` is not a valid operation on floats"),
Shl => bug!("`<<` is not a valid operation on floats"),
Shr => bug!("`>>` is not a valid operation on floats"),
BitXor | BitAnd | BitOr |
Shl | Shr => bug!("`{}` is not a valid operation on floats", bin_op.to_hir_binop().as_str()),
Eq => Bool($l == $r),
Ne => Bool($l != $r),