Explain why we forward to self-printing during self-printing
This commit is contained in:
parent
d1074edb64
commit
0347ca7d02
1 changed files with 2 additions and 1 deletions
|
@ -194,7 +194,7 @@ impl ScalarInt {
|
||||||
f_int: impl FnOnce(u64) -> InterpResult<'tcx, u64>,
|
f_int: impl FnOnce(u64) -> InterpResult<'tcx, u64>,
|
||||||
) -> InterpResult<'tcx, Self> {
|
) -> InterpResult<'tcx, Self> {
|
||||||
assert_eq!(u64::from(self.size), dl.pointer_size.bytes());
|
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]
|
#[inline]
|
||||||
|
@ -328,6 +328,7 @@ impl fmt::Debug for ScalarInt {
|
||||||
self.check_data();
|
self.check_data();
|
||||||
write!(f, "<ZST>")
|
write!(f, "<ZST>")
|
||||||
} else {
|
} else {
|
||||||
|
// Dispatch to LowerHex below.
|
||||||
write!(f, "0x{:x}", self)
|
write!(f, "0x{:x}", self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue