@@ -305,7 +305,7 @@ impl fmt::Debug for InvalidProgramInfo<'_> {
305305 Layout ( ref err) => write ! ( f, "{}" , err) ,
306306 TransmuteSizeDiff ( from_ty, to_ty) => write ! (
307307 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 " ,
309309 from_ty, to_ty
310310 ) ,
311311 }
@@ -431,7 +431,7 @@ impl fmt::Debug for UndefinedBehaviorInfo {
431431 "using uninitialized data, but this operation requires initialized memory"
432432 ) ,
433433 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" ) ,
435435 }
436436 }
437437}
@@ -462,9 +462,9 @@ impl fmt::Debug for UnsupportedOpInfo {
462462 match self {
463463 Unsupported ( ref msg) => write ! ( f, "{}" , msg) ,
464464 ReadForeignStatic ( did) => {
465- write ! ( f, "tried to read from foreign (extern) static {:?}" , did)
465+ write ! ( f, "cannot read from foreign (extern) static {:?}" , did)
466466 }
467- NoMirFor ( did) => write ! ( f, "could not load MIR for {:?}" , did) ,
467+ NoMirFor ( did) => write ! ( f, "no MIR body is available for {:?}" , did) ,
468468 ReadPointerAsBytes => write ! ( f, "unable to turn pointer into raw bytes" , ) ,
469469 ReadBytesAsPointer => write ! ( f, "unable to turn bytes into a pointer" ) ,
470470 }
0 commit comments