Skip to content

Commit

Permalink
fix the build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokathor committed Feb 2, 2019
1 parent 31bf7e1 commit e06302f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/run-pass/const-int-overflowing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const SHL_B: (u32, bool) = 0x1u32.overflowing_shl(132);
const SHR_A: (u32, bool) = 0x10u32.overflowing_shr(4);
const SHR_B: (u32, bool) = 0x10u32.overflowing_shr(132);

const NEG_A: (u32, bool) = 0.overflowing_neg();
const NEG_A: (u32, bool) = 0u32.overflowing_neg();
const NEG_B: (u32, bool) = core::u32::MAX.overflowing_neg();

fn ident<T>(ident: T) -> T {
Expand Down
7 changes: 5 additions & 2 deletions src/test/run-pass/const-int-wrapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ fn main() {
assert_eq!(SHL_A, ident(128));
assert_eq!(SHL_B, ident(1));

assert_eq!(SHR_A, ident(4294967291));
assert_eq!(SHR_B, ident(3060399406));
assert_eq!(SHR_A, ident(1));
assert_eq!(SHR_B, ident(128));

assert_eq!(NEG_A, ident(4294967291));
assert_eq!(NEG_B, ident(3060399406));
}

0 comments on commit e06302f

Please sign in to comment.