core: Fix an unsigned negation warning

This commit is contained in:
Alex Crichton 2014-05-06 21:10:22 -07:00
parent 255908ac95
commit 4a974413dc

View File

@ -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 {}