diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-04-24 14:17:05 +0200 |
|---|---|---|
| committer | Oliver Schneider <git-no-reply-9879165716479413131@oli-obk.de> | 2018-04-30 18:18:32 +0200 |
| commit | 21c2b714056f5c6fee634b87f3f4c05ac1a85bec (patch) | |
| tree | f7887419cabda429e0ad742d6b44043645ffbcb8 /src/librustc_const_math | |
| parent | 64e6dda0bce96da47e52f7f3e278d05f7a09473c (diff) | |
Remove unused error variants
Diffstat (limited to 'src/librustc_const_math')
| -rw-r--r-- | src/librustc_const_math/err.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/librustc_const_math/err.rs b/src/librustc_const_math/err.rs index bd0a332436e..dee8813e86f 100644 --- a/src/librustc_const_math/err.rs +++ b/src/librustc_const_math/err.rs @@ -8,20 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use syntax::ast; - #[derive(Debug, PartialEq, Eq, Clone, RustcEncodable, RustcDecodable)] pub enum ConstMathErr { - NotInRange, CmpBetweenUnequalTypes, UnequalTypes(Op), Overflow(Op), - ShiftNegative, DivisionByZero, RemainderByZero, - UnsignedNegation, - ULitOutOfRange(ast::UintTy), - LitOutOfRange(ast::IntTy), } pub use self::ConstMathErr::*; @@ -44,7 +37,6 @@ impl ConstMathErr { pub fn description(&self) -> &'static str { use self::Op::*; match *self { - NotInRange => "inferred value out of range", CmpBetweenUnequalTypes => "compared two values of different types", UnequalTypes(Add) => "tried to add two values of different types", UnequalTypes(Sub) => "tried to subtract two values of different types", @@ -66,22 +58,8 @@ impl ConstMathErr { Overflow(Shr) => "attempt to shift right with overflow", Overflow(Shl) => "attempt to shift left with overflow", Overflow(_) => unreachable!(), - 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", - ULitOutOfRange(ast::UintTy::U32) => "literal out of range for u32", - ULitOutOfRange(ast::UintTy::U64) => "literal out of range for u64", - ULitOutOfRange(ast::UintTy::U128) => "literal out of range for u128", - ULitOutOfRange(ast::UintTy::Usize) => "literal out of range for usize", - LitOutOfRange(ast::IntTy::I8) => "literal out of range for i8", - LitOutOfRange(ast::IntTy::I16) => "literal out of range for i16", - LitOutOfRange(ast::IntTy::I32) => "literal out of range for i32", - LitOutOfRange(ast::IntTy::I64) => "literal out of range for i64", - LitOutOfRange(ast::IntTy::I128) => "literal out of range for i128", - LitOutOfRange(ast::IntTy::Isize) => "literal out of range for isize", } } } |
