From e06302fda90dedd814c15f0517b98416b11cc204 Mon Sep 17 00:00:00 2001 From: Lokathor Date: Fri, 1 Feb 2019 20:07:26 -0700 Subject: [PATCH] fix the build errors --- src/test/run-pass/const-int-overflowing.rs | 2 +- src/test/run-pass/const-int-wrapping.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/run-pass/const-int-overflowing.rs b/src/test/run-pass/const-int-overflowing.rs index e8fd022e682..82057868b73 100644 --- a/src/test/run-pass/const-int-overflowing.rs +++ b/src/test/run-pass/const-int-overflowing.rs @@ -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(ident: T) -> T { diff --git a/src/test/run-pass/const-int-wrapping.rs b/src/test/run-pass/const-int-wrapping.rs index fe001b62581..140fd57ecb8 100644 --- a/src/test/run-pass/const-int-wrapping.rs +++ b/src/test/run-pass/const-int-wrapping.rs @@ -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)); }