diff options
Diffstat (limited to 'src/librustc_apfloat/lib.rs')
| -rw-r--r-- | src/librustc_apfloat/lib.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/librustc_apfloat/lib.rs b/src/librustc_apfloat/lib.rs index 9e3e622e252..7dea3dae0bc 100644 --- a/src/librustc_apfloat/lib.rs +++ b/src/librustc_apfloat/lib.rs @@ -49,10 +49,6 @@ #![feature(slice_patterns)] #![feature(try_from)] -#![cfg_attr(stage0, feature(const_fn))] -#![cfg_attr(not(stage0), feature(const_min_value))] -#![cfg_attr(not(stage0), feature(const_max_value))] - // See librustc_cratesio_shim/Cargo.toml for a comment explaining this. #[allow(unused_extern_crates)] extern crate rustc_cratesio_shim; @@ -98,7 +94,7 @@ impl Status { } impl<T> StatusAnd<T> { - fn map<F: FnOnce(T) -> U, U>(self, f: F) -> StatusAnd<U> { + pub fn map<F: FnOnce(T) -> U, U>(self, f: F) -> StatusAnd<U> { StatusAnd { status: self.status, value: f(self.value), @@ -380,7 +376,7 @@ pub trait Float 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) } |
