mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Fix bug in rustc_apfloat
This commit is contained in:
@@ -378,7 +378,7 @@ fn copy_sign(self, rhs: Self) -> Self {
|
||||
fn from_bits(input: u128) -> Self;
|
||||
fn from_i128_r(input: i128, round: Round) -> StatusAnd<Self> {
|
||||
if input < 0 {
|
||||
Self::from_u128_r(-input as u128, -round).map(|r| -r)
|
||||
Self::from_u128_r(input.wrapping_neg() as u128, -round).map(|r| -r)
|
||||
} else {
|
||||
Self::from_u128_r(input as u128, round)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user