Skip to content

Commit b6ce2aa

Browse files
committed
rustc_const_eval: remove unused arithmetic ErrKind variants.
1 parent d8dddbf commit b6ce2aa

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/librustc_const_eval/eval.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,6 @@ pub enum ErrKind {
380380
NotOn(ConstVal),
381381
CallOn(ConstVal),
382382

383-
DivideByZero,
384-
DivideWithOverflow,
385-
ModuloByZero,
386-
ModuloWithOverflow,
387-
ShiftLeftWithOverflow,
388-
ShiftRightWithOverflow,
389383
MissingStructField,
390384
NonConstPath,
391385
UnimplementedConstVal(&'static str),
@@ -436,12 +430,6 @@ impl ConstEvalErr {
436430
NotOn(ref const_val) => format!("not on {}", const_val.description()).into_cow(),
437431
CallOn(ref const_val) => format!("call on {}", const_val.description()).into_cow(),
438432

439-
DivideByZero => "attempted to divide by zero".into_cow(),
440-
DivideWithOverflow => "attempted to divide with overflow".into_cow(),
441-
ModuloByZero => "attempted remainder with a divisor of zero".into_cow(),
442-
ModuloWithOverflow => "attempted remainder with overflow".into_cow(),
443-
ShiftLeftWithOverflow => "attempted left shift with overflow".into_cow(),
444-
ShiftRightWithOverflow => "attempted right shift with overflow".into_cow(),
445433
MissingStructField => "nonexistent struct field".into_cow(),
446434
NonConstPath => "non-constant path in constant expression".into_cow(),
447435
UnimplementedConstVal(what) =>

0 commit comments

Comments
 (0)