Skip to content

Commit fede83c

Browse files
committed
Auto merge of #8446 - ehuss:fix-usize-32, r=alexcrichton
Fix overflow error on 32-bit. This fails to compile on 32-bit platforms with an overflow error ("attempt to shift right by 32_i32 which would overflow"). I think it would be highly unlikely for any value to be in the billions. Alternatively it can be rewritten to something like `assert!(val <= u32::MAX as usize);`.
2 parents cf3bfc9 + fbee47a commit fede83c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/cargo/core/compiler/fingerprint.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,6 @@ impl EncodedDepInfo {
19641964
dst.push((val >> 8) as u8);
19651965
dst.push((val >> 16) as u8);
19661966
dst.push((val >> 24) as u8);
1967-
assert!(val >> 32 == 0);
19681967
}
19691968
}
19701969
}

0 commit comments

Comments
 (0)