We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d6b52c commit 964ba2aCopy full SHA for 964ba2a
src/librustc_apfloat/lib.rs
@@ -378,7 +378,7 @@ pub trait Float
378
fn from_bits(input: u128) -> Self;
379
fn from_i128_r(input: i128, round: Round) -> StatusAnd<Self> {
380
if input < 0 {
381
- Self::from_u128_r(-input as u128, -round).map(|r| -r)
+ Self::from_u128_r(input.wrapping_neg() as u128, -round).map(|r| -r)
382
} else {
383
Self::from_u128_r(input as u128, round)
384
}
0 commit comments