Skip to content

Commit 24cb39f

Browse files
committed
Disable 4294967296usize on non-64 bit platforms
1 parent adfe54c commit 24cb39f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/vm/src/conversion.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ mod tests {
4141
assert_eq!(to_u32(2147483647usize).unwrap(), 2147483647);
4242
assert_eq!(to_u32(2147483648usize).unwrap(), 2147483648);
4343
assert_eq!(to_u32(4294967295usize).unwrap(), 4294967295);
44-
44+
// Gate required for Rust 1.77.0 in Linux, possibly a Rust/clippy regression bug
45+
#[cfg(target_pointer_width = "64")]
4546
match to_u32(4294967296usize) {
4647
Err(VmError::ConversionErr {
4748
from_type,
@@ -130,6 +131,8 @@ mod tests {
130131
assert_eq!(ref_to_u32(&2147483647usize).unwrap(), 2147483647);
131132
assert_eq!(ref_to_u32(&2147483648usize).unwrap(), 2147483648);
132133
assert_eq!(ref_to_u32(&4294967295usize).unwrap(), 4294967295);
134+
// Gate required for Rust 1.77.0 in Linux, possibly a Rust/clippy regression bug
135+
#[cfg(target_pointer_width = "64")]
133136
match ref_to_u32(&4294967296usize).unwrap_err() {
134137
VmError::ConversionErr {
135138
from_type,

0 commit comments

Comments
 (0)