@@ -305,7 +305,7 @@ impl fmt::Debug for InvalidProgramInfo<'_> {
305
305
Layout ( ref err) => write ! ( f, "{}" , err) ,
306
306
TransmuteSizeDiff ( from_ty, to_ty) => write ! (
307
307
f,
308
- "tried to transmute from {:?} to {:?}, but their sizes differed " ,
308
+ "transmuting `{}` to `{}` is not possible, because these types do not have the same size " ,
309
309
from_ty, to_ty
310
310
) ,
311
311
}
@@ -431,7 +431,7 @@ impl fmt::Debug for UndefinedBehaviorInfo {
431
431
"using uninitialized data, but this operation requires initialized memory"
432
432
) ,
433
433
DeadLocal => write ! ( f, "accessing a dead local variable" ) ,
434
- ReadFromReturnPlace => write ! ( f, "tried to read from the return place" ) ,
434
+ ReadFromReturnPlace => write ! ( f, "reading from return place" ) ,
435
435
}
436
436
}
437
437
}
@@ -462,9 +462,9 @@ impl fmt::Debug for UnsupportedOpInfo {
462
462
match self {
463
463
Unsupported ( ref msg) => write ! ( f, "{}" , msg) ,
464
464
ReadForeignStatic ( did) => {
465
- write ! ( f, "tried to read from foreign (extern) static {:?}" , did)
465
+ write ! ( f, "cannot read from foreign (extern) static {:?}" , did)
466
466
}
467
- NoMirFor ( did) => write ! ( f, "could not load MIR for {:?}" , did) ,
467
+ NoMirFor ( did) => write ! ( f, "no MIR body is available for {:?}" , did) ,
468
468
ReadPointerAsBytes => write ! ( f, "unable to turn pointer into raw bytes" , ) ,
469
469
ReadBytesAsPointer => write ! ( f, "unable to turn bytes into a pointer" ) ,
470
470
}
0 commit comments