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.
ptr_sized_op
1 parent 8282d52 commit d1074edCopy full SHA for d1074ed
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 { data: u128::from(f_int(u64::try_from(self.data).unwrap())?), size: self.size })
+ Ok(Self::try_from_uint(f_int(u64::try_from(self.data).unwrap())?, self.size).unwrap())
198
}
199
200
#[inline]
0 commit comments