We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1074ed commit 0347ca7Copy full SHA for 0347ca7
compiler/rustc_middle/src/ty/consts/int.rs
@@ -194,7 +194,7 @@ impl ScalarInt {
194
f_int: impl FnOnce(u64) -> InterpResult<'tcx, u64>,
195
) -> InterpResult<'tcx, Self> {
196
assert_eq!(u64::from(self.size), dl.pointer_size.bytes());
197
- 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())
198
}
199
200
#[inline]
@@ -328,6 +328,7 @@ impl fmt::Debug for ScalarInt {
328
self.check_data();
329
write!(f, "<ZST>")
330
} else {
331
+ // Dispatch to LowerHex below.
332
write!(f, "0x{:x}", self)
333
334
0 commit comments