@@ -229,7 +229,7 @@ impl<'tcx> From<InterpError<'tcx, u64>> for InterpErrorInfo<'tcx> {
229
229
pub type AssertMessage < ' tcx > = InterpError < ' tcx , mir:: Operand < ' tcx > > ;
230
230
231
231
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
232
- pub enum EvalErrorPanic < O > {
232
+ pub enum PanicMessage < O > {
233
233
Panic {
234
234
msg : Symbol ,
235
235
line : u32 ,
@@ -311,7 +311,7 @@ pub enum InterpError<'tcx, O> {
311
311
HeapAllocZeroBytes ,
312
312
HeapAllocNonPowerOfTwoAlignment ( u64 ) ,
313
313
Unreachable ,
314
- Panic ( EvalErrorPanic < O > ) ,
314
+ Panic ( PanicMessage < O > ) ,
315
315
ReadFromReturnPointer ,
316
316
PathNotFound ( Vec < String > ) ,
317
317
UnimplementedTraitSelection ,
@@ -428,31 +428,31 @@ impl<'tcx, O> InterpError<'tcx, O> {
428
428
two",
429
429
Unreachable =>
430
430
"entered unreachable code" ,
431
- Panic ( EvalErrorPanic :: Panic { ..} ) =>
431
+ Panic ( PanicMessage :: Panic { ..} ) =>
432
432
"the evaluated program panicked" ,
433
- Panic ( EvalErrorPanic :: BoundsCheck { ..} ) =>
433
+ Panic ( PanicMessage :: BoundsCheck { ..} ) =>
434
434
"array index out of bounds" ,
435
- Panic ( EvalErrorPanic :: Overflow ( mir:: BinOp :: Add ) ) =>
435
+ Panic ( PanicMessage :: Overflow ( mir:: BinOp :: Add ) ) =>
436
436
"attempt to add with overflow" ,
437
- Panic ( EvalErrorPanic :: Overflow ( mir:: BinOp :: Sub ) ) =>
437
+ Panic ( PanicMessage :: Overflow ( mir:: BinOp :: Sub ) ) =>
438
438
"attempt to subtract with overflow" ,
439
- Panic ( EvalErrorPanic :: Overflow ( mir:: BinOp :: Mul ) ) =>
439
+ Panic ( PanicMessage :: Overflow ( mir:: BinOp :: Mul ) ) =>
440
440
"attempt to multiply with overflow" ,
441
- Panic ( EvalErrorPanic :: Overflow ( mir:: BinOp :: Div ) ) =>
441
+ Panic ( PanicMessage :: Overflow ( mir:: BinOp :: Div ) ) =>
442
442
"attempt to divide with overflow" ,
443
- Panic ( EvalErrorPanic :: Overflow ( mir:: BinOp :: Rem ) ) =>
443
+ Panic ( PanicMessage :: Overflow ( mir:: BinOp :: Rem ) ) =>
444
444
"attempt to calculate the remainder with overflow" ,
445
- Panic ( EvalErrorPanic :: OverflowNeg ) =>
445
+ Panic ( PanicMessage :: OverflowNeg ) =>
446
446
"attempt to negate with overflow" ,
447
- Panic ( EvalErrorPanic :: Overflow ( mir:: BinOp :: Shr ) ) =>
447
+ Panic ( PanicMessage :: Overflow ( mir:: BinOp :: Shr ) ) =>
448
448
"attempt to shift right with overflow" ,
449
- Panic ( EvalErrorPanic :: Overflow ( mir:: BinOp :: Shl ) ) =>
449
+ Panic ( PanicMessage :: Overflow ( mir:: BinOp :: Shl ) ) =>
450
450
"attempt to shift left with overflow" ,
451
- Panic ( EvalErrorPanic :: Overflow ( op) ) =>
451
+ Panic ( PanicMessage :: Overflow ( op) ) =>
452
452
bug ! ( "{:?} cannot overflow" , op) ,
453
- Panic ( EvalErrorPanic :: DivisionByZero ) =>
453
+ Panic ( PanicMessage :: DivisionByZero ) =>
454
454
"attempt to divide by zero" ,
455
- Panic ( EvalErrorPanic :: RemainderByZero ) =>
455
+ Panic ( PanicMessage :: RemainderByZero ) =>
456
456
"attempt to calculate the remainder with a divisor of zero" ,
457
457
ReadFromReturnPointer =>
458
458
"tried to read from the return pointer" ,
@@ -535,9 +535,9 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for InterpError<'tcx, O> {
535
535
write ! ( f, "incorrect alloc info: expected size {} and align {}, \
536
536
got size {} and align {}",
537
537
size. bytes( ) , align. bytes( ) , size2. bytes( ) , align2. bytes( ) ) ,
538
- Panic ( EvalErrorPanic :: Panic { ref msg, line, col, ref file } ) =>
538
+ Panic ( PanicMessage :: Panic { ref msg, line, col, ref file } ) =>
539
539
write ! ( f, "the evaluated program panicked at '{}', {}:{}:{}" , msg, file, line, col) ,
540
- Panic ( EvalErrorPanic :: BoundsCheck { ref len, ref index } ) =>
540
+ Panic ( PanicMessage :: BoundsCheck { ref len, ref index } ) =>
541
541
write ! ( f, "index out of bounds: the len is {:?} but the index is {:?}" , len, index) ,
542
542
InvalidDiscriminant ( val) =>
543
543
write ! ( f, "encountered invalid enum discriminant {}" , val) ,
0 commit comments