Skip to content

Commit 250b27d

Browse files
committed
bikeshed
1 parent 18d0907 commit 250b27d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_middle/mir/interpret/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -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-
"transmuting from {:?} to {:?}, which do not have the same size",
308+
"transmuting `{}` to `{}` is not possible, because these types do not have the same size",
309309
from_ty, to_ty
310310
),
311311
}
@@ -464,7 +464,7 @@ impl fmt::Debug for UnsupportedOpInfo {
464464
ReadForeignStatic(did) => {
465465
write!(f, "cannot read from foreign (extern) static {:?}", did)
466466
}
467-
NoMirFor(did) => write!(f, "cannot 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
}

src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: any use of this value will cause an error
44
LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
55
| ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^---
66
| |
7-
| transmuting from usize to &[u8], which do not have the same size
7+
| transmuting `usize` to `&[u8]` is not possible, because these types do not have the same size
88
|
99
= note: `#[deny(const_err)]` on by default
1010

0 commit comments

Comments
 (0)