From b6ce2aa4eacdbad3e98b17d3a66daea3cc7f2880 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Thu, 26 May 2016 20:19:12 +0300 Subject: [PATCH] rustc_const_eval: remove unused arithmetic ErrKind variants. --- src/librustc_const_eval/eval.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index 5613b1211199..a61318c47a48 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -380,12 +380,6 @@ pub enum ErrKind { NotOn(ConstVal), CallOn(ConstVal), - DivideByZero, - DivideWithOverflow, - ModuloByZero, - ModuloWithOverflow, - ShiftLeftWithOverflow, - ShiftRightWithOverflow, MissingStructField, NonConstPath, UnimplementedConstVal(&'static str), @@ -436,12 +430,6 @@ impl ConstEvalErr { NotOn(ref const_val) => format!("not on {}", const_val.description()).into_cow(), CallOn(ref const_val) => format!("call on {}", const_val.description()).into_cow(), - DivideByZero => "attempted to divide by zero".into_cow(), - DivideWithOverflow => "attempted to divide with overflow".into_cow(), - ModuloByZero => "attempted remainder with a divisor of zero".into_cow(), - ModuloWithOverflow => "attempted remainder with overflow".into_cow(), - ShiftLeftWithOverflow => "attempted left shift with overflow".into_cow(), - ShiftRightWithOverflow => "attempted right shift with overflow".into_cow(), MissingStructField => "nonexistent struct field".into_cow(), NonConstPath => "non-constant path in constant expression".into_cow(), UnimplementedConstVal(what) =>