Skip to content

Commit 848080d

Browse files
committed
Remove unused IndexOutOfBounds variant
1 parent 13a55e8 commit 848080d

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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,6 @@ for ::middle::const_val::ErrKind<'gcx> {
530530
CheckMatchError => {
531531
// nothing to do
532532
}
533-
IndexOutOfBounds { len, index } => {
534-
len.hash_stable(hcx, hasher);
535-
index.hash_stable(hcx, hasher);
536-
}
537533
Miri(ref err, ref trace) => {
538534
err.hash_stable(hcx, hasher);
539535
trace.hash_stable(hcx, hasher);

src/librustc/middle/const_val.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ pub enum ErrKind<'tcx> {
4141

4242
NonConstPath,
4343
CouldNotResolve,
44-
IndexOutOfBounds { len: u64, index: u64 },
45-
4644
TypeckError,
4745
CheckMatchError,
4846
Miri(::mir::interpret::EvalError<'tcx>, Vec<FrameInfo>),
@@ -86,11 +84,6 @@ impl<'a, 'gcx, 'tcx> ConstEvalErr<'tcx> {
8684
match *self.kind {
8785
NonConstPath => simple!("non-constant path in constant expression"),
8886
CouldNotResolve => simple!("could not resolve"),
89-
IndexOutOfBounds { len, index } => {
90-
simple!("index out of bounds: the len is {} but the index is {}",
91-
len, index)
92-
}
93-
9487
TypeckError => simple!("type-checking failed"),
9588
CheckMatchError => simple!("match-checking failed"),
9689
Miri(ref err, ref trace) => Backtrace(err, trace),

src/librustc/ty/structural_impls.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,6 @@ impl<'a, 'tcx> Lift<'tcx> for const_val::ErrKind<'a> {
596596
Some(match *self {
597597
NonConstPath => NonConstPath,
598598
CouldNotResolve => CouldNotResolve,
599-
IndexOutOfBounds { len, index } => IndexOutOfBounds { len, index },
600-
601599
TypeckError => TypeckError,
602600
CheckMatchError => CheckMatchError,
603601
Miri(ref e, ref frames) => return tcx.lift(e).map(|e| Miri(e, frames.clone())),

0 commit comments

Comments
 (0)