about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-06-05 19:02:03 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-06-05 20:49:47 +0200
commit848080dc42a0080fc4dc1d29556aaddbbc3e5bd5 (patch)
tree94577ddada4efd83340b5c1ddd8b7fcb023555ad
parent13a55e8801c64f0033475ba776dc2c157c54a43d (diff)
downloadrust-848080dc42a0080fc4dc1d29556aaddbbc3e5bd5.tar.gz
rust-848080dc42a0080fc4dc1d29556aaddbbc3e5bd5.zip
Remove unused IndexOutOfBounds variant
-rw-r--r--src/librustc/ich/impls_ty.rs4
-rw-r--r--src/librustc/middle/const_val.rs7
-rw-r--r--src/librustc/ty/structural_impls.rs2
3 files changed, 0 insertions, 13 deletions
diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs
index 592ada83c85..fe19196fe06 100644
--- a/src/librustc/ich/impls_ty.rs
+++ b/src/librustc/ich/impls_ty.rs
@@ -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);
diff --git a/src/librustc/middle/const_val.rs b/src/librustc/middle/const_val.rs
index d2c6bb28948..3abe405d598 100644
--- a/src/librustc/middle/const_val.rs
+++ b/src/librustc/middle/const_val.rs
@@ -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),
diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs
index 537efcd9b59..2055f11f9f8 100644
--- a/src/librustc/ty/structural_impls.rs
+++ b/src/librustc/ty/structural_impls.rs
@@ -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())),