Skip to content

Commit 6614e88

Browse files
authored
Unrolled build for #143356
Rollup merge of #143356 - hkBst:clippy-fix-2, r=scottmcm use unsigned_abs instead of `abs` on signed int to silence clippy Use `unsigned_abs` instead of `abs` on signed int to silence clippy. Alternatively we could allow the lint, but if codegen is not affected, then this seems preferable.
2 parents 837c5dd + d9505f0 commit 6614e88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/uint_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2572,7 +2572,7 @@ macro_rules! uint_impl {
25722572
if size_of::<Self>() == 1 {
25732573
// Trick LLVM into generating the psadbw instruction when SSE2
25742574
// is available and this function is autovectorized for u8's.
2575-
(self as i32).wrapping_sub(other as i32).abs() as Self
2575+
(self as i32).wrapping_sub(other as i32).unsigned_abs() as Self
25762576
} else {
25772577
if self < other {
25782578
other - self

0 commit comments

Comments
 (0)