diff options
Diffstat (limited to 'src/librustc_const_math/err.rs')
| -rw-r--r-- | src/librustc_const_math/err.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/librustc_const_math/err.rs b/src/librustc_const_math/err.rs index e4eb0f2c97e..e2e30ef026c 100644 --- a/src/librustc_const_math/err.rs +++ b/src/librustc_const_math/err.rs @@ -57,18 +57,18 @@ impl ConstMathErr { UnequalTypes(BitOr) => "tried to bitor two values of different types", UnequalTypes(BitXor) => "tried to xor two values of different types", UnequalTypes(_) => unreachable!(), - Overflow(Add) => "attempted to add with overflow", - Overflow(Sub) => "attempted to subtract with overflow", - Overflow(Mul) => "attempted to multiply with overflow", - Overflow(Div) => "attempted to divide with overflow", - Overflow(Rem) => "attempted to calculate the remainder with overflow", - Overflow(Neg) => "attempted to negate with overflow", - Overflow(Shr) => "attempted to shift right with overflow", - Overflow(Shl) => "attempted to shift left with overflow", + Overflow(Add) => "attempt to add with overflow", + Overflow(Sub) => "attempt to subtract with overflow", + Overflow(Mul) => "attempt to multiply with overflow", + Overflow(Div) => "attempt to divide with overflow", + Overflow(Rem) => "attempt to calculate the remainder with overflow", + Overflow(Neg) => "attempt to negate with overflow", + Overflow(Shr) => "attempt to shift right with overflow", + Overflow(Shl) => "attempt to shift left with overflow", Overflow(_) => unreachable!(), - ShiftNegative => "attempted to shift by a negative amount", - DivisionByZero => "attempted to divide by zero", - RemainderByZero => "attempted to calculate the remainder with a divisor of zero", + ShiftNegative => "attempt to shift by a negative amount", + DivisionByZero => "attempt to divide by zero", + RemainderByZero => "attempt to calculate the remainder with a divisor of zero", UnsignedNegation => "unary negation of unsigned integer", ULitOutOfRange(ast::UintTy::U8) => "literal out of range for u8", ULitOutOfRange(ast::UintTy::U16) => "literal out of range for u16", |
