Skip to content

Commit

Permalink
Remove unused IndexOutOfBounds variant
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 5, 2018
1 parent 13a55e8 commit 848080d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/librustc/ich/impls_ty.rs
Expand Up @@ -530,10 +530,6 @@ for ::middle::const_val::ErrKind<'gcx> {
CheckMatchError => {
// nothing to do
}
IndexOutOfBounds { len, index } => {
len.hash_stable(hcx, hasher);
index.hash_stable(hcx, hasher);
}
Miri(ref err, ref trace) => {
err.hash_stable(hcx, hasher);
trace.hash_stable(hcx, hasher);
Expand Down
7 changes: 0 additions & 7 deletions src/librustc/middle/const_val.rs
Expand Up @@ -41,8 +41,6 @@ pub enum ErrKind<'tcx> {

NonConstPath,
CouldNotResolve,
IndexOutOfBounds { len: u64, index: u64 },

TypeckError,
CheckMatchError,
Miri(::mir::interpret::EvalError<'tcx>, Vec<FrameInfo>),
Expand Down Expand Up @@ -86,11 +84,6 @@ impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
match *self.kind {
NonConstPath => simple!("non-constant path in constant expression"),
CouldNotResolve => simple!("could not resolve"),
IndexOutOfBounds { len, index } => {
simple!("index out of bounds: the len is {} but the index is {}",
len, index)
}

TypeckError => simple!("type-checking failed"),
CheckMatchError => simple!("match-checking failed"),
Miri(ref err, ref trace) => Backtrace(err, trace),
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/ty/structural_impls.rs
Expand Up @@ -596,8 +596,6 @@ impl<'a, 'tcx> Lift<'tcx> for const_val::ErrKind<'a> {
Some(match *self {
NonConstPath => NonConstPath,
CouldNotResolve => CouldNotResolve,
IndexOutOfBounds { len, index } => IndexOutOfBounds { len, index },

TypeckError => TypeckError,
CheckMatchError => CheckMatchError,
Miri(ref e, ref frames) => return tcx.lift(e).map(|e| Miri(e, frames.clone())),
Expand Down

0 comments on commit 848080d

Please sign in to comment.