mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Explain why we forward to self-printing during self-printing
This commit is contained in:
@@ -194,7 +194,7 @@ pub(crate) fn ptr_sized_op<'tcx>(
|
||||
f_int: impl FnOnce(u64) -> InterpResult<'tcx, u64>,
|
||||
) -> InterpResult<'tcx, Self> {
|
||||
assert_eq!(u64::from(self.size), dl.pointer_size.bytes());
|
||||
Ok(Self::try_from_uint(f_int(u64::try_from(self.data).unwrap())?, self.size).unwrap())
|
||||
Ok(Self::try_from_uint(f_int(u64::try_from(self.data).unwrap())?, self.size()).unwrap())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
@@ -328,6 +328,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.check_data();
|
||||
write!(f, "<ZST>")
|
||||
} else {
|
||||
// Dispatch to LowerHex below.
|
||||
write!(f, "0x{:x}", self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user