Skip to content

Commit e06302f

Browse files
committed
fix the build errors
1 parent 31bf7e1 commit e06302f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/test/run-pass/const-int-overflowing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const SHL_B: (u32, bool) = 0x1u32.overflowing_shl(132);
1313
const SHR_A: (u32, bool) = 0x10u32.overflowing_shr(4);
1414
const SHR_B: (u32, bool) = 0x10u32.overflowing_shr(132);
1515

16-
const NEG_A: (u32, bool) = 0.overflowing_neg();
16+
const NEG_A: (u32, bool) = 0u32.overflowing_neg();
1717
const NEG_B: (u32, bool) = core::u32::MAX.overflowing_neg();
1818

1919
fn ident<T>(ident: T) -> T {

src/test/run-pass/const-int-wrapping.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ fn main() {
3333
assert_eq!(SHL_A, ident(128));
3434
assert_eq!(SHL_B, ident(1));
3535

36-
assert_eq!(SHR_A, ident(4294967291));
37-
assert_eq!(SHR_B, ident(3060399406));
36+
assert_eq!(SHR_A, ident(1));
37+
assert_eq!(SHR_B, ident(128));
38+
39+
assert_eq!(NEG_A, ident(4294967291));
40+
assert_eq!(NEG_B, ident(3060399406));
3841
}

0 commit comments

Comments
 (0)