From 4a974413dcce8a5a9f1df3d58503c63b8f5b556a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 6 May 2014 21:10:22 -0700 Subject: [PATCH] core: Fix an unsigned negation warning --- src/libcore/num/uint_macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/num/uint_macros.rs b/src/libcore/num/uint_macros.rs index a53388bd0e3..092f7d81d22 100644 --- a/src/libcore/num/uint_macros.rs +++ b/src/libcore/num/uint_macros.rs @@ -89,7 +89,7 @@ impl Rem<$T,$T> for $T { #[cfg(not(test))] impl Neg<$T> for $T { #[inline] - fn neg(&self) -> $T { -*self } + fn neg(&self) -> $T { -(*self as $T_SIGNED) as $T } } impl Unsigned for $T {}