@@ -325,7 +325,8 @@ impl<'tcx, O> EvalErrorKind<'tcx, O> {
325
325
ReadForeignStatic =>
326
326
"tried to read from foreign (extern) static" ,
327
327
InvalidPointerMath =>
328
- "attempted to do invalid arithmetic on pointers that would leak base addresses, e.g. comparing pointers into different allocations" ,
328
+ "attempted to do invalid arithmetic on pointers that would leak base addresses, \
329
+ e.g. comparing pointers into different allocations",
329
330
ReadUndefBytes =>
330
331
"attempted to read undefined bytes" ,
331
332
DeadLocal =>
@@ -379,11 +380,13 @@ impl<'tcx, O> EvalErrorKind<'tcx, O> {
379
380
Layout ( _) =>
380
381
"rustc layout computation failed" ,
381
382
UnterminatedCString ( _) =>
382
- "attempted to get length of a null terminated string, but no null found before end of allocation" ,
383
+ "attempted to get length of a null terminated string, but no null found before end
384
+ of allocation" ,
383
385
HeapAllocZeroBytes =>
384
386
"tried to re-, de- or allocate zero bytes on the heap" ,
385
387
HeapAllocNonPowerOfTwoAlignment ( _) =>
386
- "tried to re-, de-, or allocate heap memory with alignment that is not a power of two" ,
388
+ "tried to re-, de-, or allocate heap memory with alignment that is not a power of
389
+ two" ,
387
390
Unreachable =>
388
391
"entered unreachable code" ,
389
392
Panic { .. } =>
@@ -445,8 +448,8 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for EvalErrorKind<'tcx, O> {
445
448
kind, ptr, len, lock)
446
449
}
447
450
InvalidMemoryLockRelease { ptr, len, frame, ref lock } => {
448
- write ! ( f, "frame {} tried to release memory write lock at {:?}, size {}, but cannot release lock {:?}" ,
449
- frame, ptr, len, lock)
451
+ write ! ( f, "frame {} tried to release memory write lock at {:?}, size {}, but \
452
+ cannot release lock {:?}" , frame, ptr, len, lock)
450
453
}
451
454
DeallocatedLockedMemory { ptr, ref lock } => {
452
455
write ! ( f, "tried to deallocate memory at {:?} in conflict with lock {:?}" ,
@@ -457,7 +460,8 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for EvalErrorKind<'tcx, O> {
457
460
}
458
461
NoMirFor ( ref func) => write ! ( f, "no mir for `{}`" , func) ,
459
462
FunctionPointerTyMismatch ( sig, got) =>
460
- write ! ( f, "tried to call a function with sig {} through a function pointer of type {}" , sig, got) ,
463
+ write ! ( f, "tried to call a function with sig {} through a \
464
+ function pointer of type {}", sig, got) ,
461
465
BoundsCheck { ref len, ref index } =>
462
466
write ! ( f, "index out of bounds: the len is {:?} but the index is {:?}" , len, index) ,
463
467
ReallocatedWrongMemoryKind ( ref old, ref new) =>
@@ -480,7 +484,8 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for EvalErrorKind<'tcx, O> {
480
484
MachineError ( ref inner) =>
481
485
write ! ( f, "{}" , inner) ,
482
486
IncorrectAllocationInformation ( size, size2, align, align2) =>
483
- write ! ( f, "incorrect alloc info: expected size {} and align {}, got size {} and align {}" , size. bytes( ) , align. abi( ) , size2. bytes( ) , align2. abi( ) ) ,
487
+ write ! ( f, "incorrect alloc info: expected size {} and align {}, got size {} and \
488
+ align {}", size. bytes( ) , align. abi( ) , size2. bytes( ) , align2. abi( ) ) ,
484
489
Panic { ref msg, line, col, ref file } =>
485
490
write ! ( f, "the evaluated program panicked at '{}', {}:{}:{}" , msg, file, line, col) ,
486
491
_ => write ! ( f, "{}" , self . description( ) ) ,
0 commit comments