aboutsummaryrefslogtreecommitdiff
path: root/libcore/fmt
diff options
context:
space:
mode:
authorpravic <[email protected]>2016-04-29 21:16:15 +0300
committerpravic <[email protected]>2016-04-29 21:16:15 +0300
commit77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000 (patch)
tree710e445d56a1a582b8eff19b7b4b180276eae122 /libcore/fmt
parenttweak: /driver option specifies /fixed:no implicitly as well (diff)
downloadkmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.tar.xz
kmd-env-rs-77e9a3167b4aaadf3583a0c1d1ee0d9e63c9a000.zip
update libcore to 2016-04-29 nightly
Diffstat (limited to 'libcore/fmt')
-rw-r--r--libcore/fmt/builders.rs2
-rw-r--r--libcore/fmt/mod.rs9
2 files changed, 2 insertions, 9 deletions
diff --git a/libcore/fmt/builders.rs b/libcore/fmt/builders.rs
index d337463..6cac80a 100644
--- a/libcore/fmt/builders.rs
+++ b/libcore/fmt/builders.rs
@@ -9,7 +9,7 @@
// except according to those terms.
use prelude::v1::*;
-use fmt::{self, Write, FlagV1};
+use fmt::{self, FlagV1};
struct PadAdapter<'a, 'b: 'a> {
fmt: &'a mut fmt::Formatter<'b>,
diff --git a/libcore/fmt/mod.rs b/libcore/fmt/mod.rs
index 3637238..0c824b5 100644
--- a/libcore/fmt/mod.rs
+++ b/libcore/fmt/mod.rs
@@ -17,7 +17,6 @@ use prelude::v1::*;
use cell::{UnsafeCell, Cell, RefCell, Ref, RefMut, BorrowState};
use marker::PhantomData;
use mem;
-#[cfg(not(disable_float))]
use num::flt2dec;
use ops::Deref;
use result;
@@ -61,7 +60,7 @@ pub type Result = result::Result<(), Error>;
/// occurred. Any extra information must be arranged to be transmitted through
/// some other means.
#[stable(feature = "rust1", since = "1.0.0")]
-#[derive(Copy, Clone, Debug)]
+#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Error;
/// A collection of methods that are required to format a message into a stream.
@@ -1024,7 +1023,6 @@ impl<'a> Formatter<'a> {
/// Takes the formatted parts and applies the padding.
/// Assumes that the caller already has rendered the parts with required precision,
/// so that `self.precision` can be ignored.
- #[cfg(not(disable_float))]
fn pad_formatted_parts(&mut self, formatted: &flt2dec::Formatted) -> Result {
if let Some(mut width) = self.width {
// for the sign-aware zero padding, we render the sign first and
@@ -1061,7 +1059,6 @@ impl<'a> Formatter<'a> {
}
}
- #[cfg(not(disable_float))]
fn write_formatted_parts(&mut self, formatted: &flt2dec::Formatted) -> Result {
fn write_bytes(buf: &mut Write, s: &[u8]) -> Result {
buf.write_str(unsafe { str::from_utf8_unchecked(s) })
@@ -1450,7 +1447,6 @@ impl<'a, T: ?Sized> Pointer for &'a mut T {
}
}
-#[cfg(not(disable_float))]
// Common code of floating point Debug and Display.
fn float_to_decimal_common<T>(fmt: &mut Formatter, num: &T, negative_zero: bool) -> Result
where T: flt2dec::DecodableFloat
@@ -1475,7 +1471,6 @@ fn float_to_decimal_common<T>(fmt: &mut Formatter, num: &T, negative_zero: bool)
fmt.pad_formatted_parts(&formatted)
}
-#[cfg(not(disable_float))]
// Common code of floating point LowerExp and UpperExp.
fn float_to_exponential_common<T>(fmt: &mut Formatter, num: &T, upper: bool) -> Result
where T: flt2dec::DecodableFloat
@@ -1529,9 +1524,7 @@ macro_rules! floating { ($ty:ident) => {
}
}
} }
-#[cfg(not(disable_float))]
floating! { f32 }
-#[cfg(not(disable_float))]
floating! { f64 }
// Implementation of Display/Debug for various core types