@@ -228,6 +228,24 @@ impl<'tcx> From<InterpError<'tcx, u64>> for InterpErrorInfo<'tcx> {
228
228
229
229
pub type AssertMessage < ' tcx > = InterpError < ' tcx , mir:: Operand < ' tcx > > ;
230
230
231
+ #[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
232
+ pub enum EvalErrorPanic < O > {
233
+ Panic {
234
+ msg : Symbol ,
235
+ line : u32 ,
236
+ col : u32 ,
237
+ file : Symbol ,
238
+ } ,
239
+ BoundsCheck {
240
+ len : O ,
241
+ index : O ,
242
+ } ,
243
+ Overflow ( mir:: BinOp ) ,
244
+ OverflowNeg ,
245
+ DivisionByZero ,
246
+ RemainderByZero ,
247
+ }
248
+
231
249
#[ derive( Clone , RustcEncodable , RustcDecodable , HashStable ) ]
232
250
pub enum InterpError < ' tcx , O > {
233
251
/// This variant is used by machines to signal their own errors that do not
@@ -247,7 +265,6 @@ pub enum InterpError<'tcx, O> {
247
265
DanglingPointerDeref ,
248
266
DoubleFree ,
249
267
InvalidMemoryAccess ,
250
- FunctionPointerTyMismatch ( FnSig < ' tcx > , FnSig < ' tcx > ) ,
251
268
InvalidFunctionPointer ,
252
269
InvalidBool ,
253
270
InvalidDiscriminant ( ScalarMaybeUndef ) ,
@@ -267,13 +284,11 @@ pub enum InterpError<'tcx, O> {
267
284
Unimplemented ( String ) ,
268
285
DerefFunctionPointer ,
269
286
ExecuteMemory ,
270
- // asd
271
287
BoundsCheck { len : O , index : O } ,
272
288
Overflow ( mir:: BinOp ) ,
273
289
OverflowNeg ,
274
290
DivisionByZero ,
275
291
RemainderByZero ,
276
- // asd
277
292
Intrinsic ( String ) ,
278
293
InvalidChar ( u128 ) ,
279
294
StackFrameLimitReached ,
@@ -284,29 +299,6 @@ pub enum InterpError<'tcx, O> {
284
299
required : Align ,
285
300
has : Align ,
286
301
} ,
287
- MemoryLockViolation {
288
- ptr : Pointer ,
289
- len : u64 ,
290
- frame : usize ,
291
- access : AccessKind ,
292
- lock : Lock ,
293
- } ,
294
- MemoryAcquireConflict {
295
- ptr : Pointer ,
296
- len : u64 ,
297
- kind : AccessKind ,
298
- lock : Lock ,
299
- } ,
300
- InvalidMemoryLockRelease {
301
- ptr : Pointer ,
302
- len : u64 ,
303
- frame : usize ,
304
- lock : Lock ,
305
- } ,
306
- DeallocatedLockedMemory {
307
- ptr : Pointer ,
308
- lock : Lock ,
309
- } ,
310
302
ValidationFailure ( String ) ,
311
303
CalledClosureAsFunction ,
312
304
VtableForArgumentlessMethod ,
@@ -324,7 +316,7 @@ pub enum InterpError<'tcx, O> {
324
316
HeapAllocZeroBytes ,
325
317
HeapAllocNonPowerOfTwoAlignment ( u64 ) ,
326
318
Unreachable ,
327
- Panic ( EvalErrorPanic < ' tcx , O > ) ,
319
+ Panic ( EvalErrorPanic < O > ) ,
328
320
ReadFromReturnPointer ,
329
321
PathNotFound ( Vec < String > ) ,
330
322
UnimplementedTraitSelection ,
@@ -340,15 +332,6 @@ pub enum InterpError<'tcx, O> {
340
332
InfiniteLoop ,
341
333
}
342
334
343
- #[ derive( Clone , RustcEncodable , RustcDecodable ) ]
344
- pub enum EvalErrorPanic < ' tcx , O > {
345
- Panic ,
346
- BoundsCheck { len : O , index : O } ,
347
- Overflow ( mir:: BinOp ) ,
348
- OverflowNeg ,
349
- DivisionByZero ,
350
- RemainderByZero ,
351
- }
352
335
353
336
pub type InterpResult < ' tcx , T = ( ) > = Result < T , InterpErrorInfo < ' tcx > > ;
354
337
@@ -549,8 +532,8 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for InterpError<'tcx, O> {
549
532
write ! ( f, "incorrect alloc info: expected size {} and align {}, \
550
533
got size {} and align {}",
551
534
size. bytes( ) , align. bytes( ) , size2. bytes( ) , align2. bytes( ) ) ,
552
- Panic { ref msg , line , col , ref file } =>
553
- write ! ( f, "the evaluated program panicked at '{}', {}:{}:{}" , msg , file , line , col ) ,
535
+ Panic { .. } =>
536
+ write ! ( f, "the evaluated program panicked" ) ,
554
537
InvalidDiscriminant ( val) =>
555
538
write ! ( f, "encountered invalid enum discriminant {}" , val) ,
556
539
Exit ( code) =>
0 commit comments