Remove unused IndexOutOfBounds variant

This commit is contained in:
Oliver Schneider 2018-06-05 19:02:03 +02:00
parent 13a55e8801
commit 848080dc42
3 changed files with 0 additions and 13 deletions

View file

@ -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);

View file

@ -41,8 +41,6 @@ pub enum ErrKind<'tcx> {
NonConstPath,
CouldNotResolve,
IndexOutOfBounds { len: u64, index: u64 },
TypeckError,
CheckMatchError,
Miri(::mir::interpret::EvalError<'tcx>, Vec<FrameInfo>),
@ -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),

View file

@ -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())),