Skip to content

Commit d1d8d99

Browse files
committed
Remove unused const error variant
1 parent 0aa6e03 commit d1d8d99

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

src/librustc/ich/impls_ty.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,6 @@ for ::middle::const_val::ErrKind<'gcx> {
505505
len.hash_stable(hcx, hasher);
506506
index.hash_stable(hcx, hasher);
507507
}
508-
Math(ref const_math_err) => {
509-
const_math_err.hash_stable(hcx, hasher);
510-
}
511508
LayoutError(ref layout_error) => {
512509
layout_error.hash_stable(hcx, hasher);
513510
}

src/librustc/middle/const_val.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use hir::def_id::DefId;
1212
use ty::{self, TyCtxt, layout};
1313
use ty::subst::Substs;
14-
use rustc_const_math::*;
1514
use mir::interpret::{Value, PrimVal};
1615
use errors::DiagnosticBuilder;
1716

@@ -62,7 +61,6 @@ pub enum ErrKind<'tcx> {
6261
UnimplementedConstVal(&'static str),
6362
IndexOutOfBounds { len: u64, index: u64 },
6463

65-
Math(ConstMathErr),
6664
LayoutError(layout::LayoutError<'tcx>),
6765

6866
TypeckError,
@@ -76,12 +74,6 @@ pub struct FrameInfo {
7674
pub location: String,
7775
}
7876

79-
impl<'tcx> From<ConstMathErr> for ErrKind<'tcx> {
80-
fn from(err: ConstMathErr) -> ErrKind<'tcx> {
81-
ErrKind::Math(err)
82-
}
83-
}
84-
8577
#[derive(Clone, Debug)]
8678
pub enum ConstEvalErrDescription<'a, 'tcx: 'a> {
8779
Simple(Cow<'a, str>),
@@ -119,7 +111,6 @@ impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
119111
len, index)
120112
}
121113

122-
Math(ref err) => Simple(err.description().into_cow()),
123114
LayoutError(ref err) => Simple(err.to_string().into_cow()),
124115

125116
TypeckError => simple!("type-checking failed"),

src/librustc/ty/structural_impls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,6 @@ impl<'a, 'tcx> Lift<'tcx> for const_val::ErrKind<'a> {
585585
NonConstPath => NonConstPath,
586586
UnimplementedConstVal(s) => UnimplementedConstVal(s),
587587
IndexOutOfBounds { len, index } => IndexOutOfBounds { len, index },
588-
Math(ref e) => Math(e.clone()),
589588

590589
LayoutError(ref e) => {
591590
return tcx.lift(e).map(LayoutError)

0 commit comments

Comments
 (0)