bikeshed
This commit is contained in:
parent
18d0907dcc
commit
250b27d996
@ -305,7 +305,7 @@ impl fmt::Debug for InvalidProgramInfo<'_> {
|
||||
Layout(ref err) => write!(f, "{}", err),
|
||||
TransmuteSizeDiff(from_ty, to_ty) => write!(
|
||||
f,
|
||||
"transmuting from {:?} to {:?}, which do not have the same size",
|
||||
"transmuting `{}` to `{}` is not possible, because these types do not have the same size",
|
||||
from_ty, to_ty
|
||||
),
|
||||
}
|
||||
@ -464,7 +464,7 @@ impl fmt::Debug for UnsupportedOpInfo {
|
||||
ReadForeignStatic(did) => {
|
||||
write!(f, "cannot read from foreign (extern) static {:?}", did)
|
||||
}
|
||||
NoMirFor(did) => write!(f, "cannot load MIR for {:?}", did),
|
||||
NoMirFor(did) => write!(f, "no MIR body is available for {:?}", did),
|
||||
ReadPointerAsBytes => write!(f, "unable to turn pointer into raw bytes",),
|
||||
ReadBytesAsPointer => write!(f, "unable to turn bytes into a pointer"),
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ error: any use of this value will cause an error
|
||||
LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
|
||||
| ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^---
|
||||
| |
|
||||
| transmuting from usize to &[u8], which do not have the same size
|
||||
| transmuting `usize` to `&[u8]` is not possible, because these types do not have the same size
|
||||
|
|
||||
= note: `#[deny(const_err)]` on by default
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user