diff options
| author | Keegan McAllister <kmcallister@mozilla.com> | 2014-09-15 19:29:47 -0700 |
|---|---|---|
| committer | Keegan McAllister <kmcallister@mozilla.com> | 2015-01-05 12:00:56 -0800 |
| commit | 73806ddd0fd91066d7b903a00a080cbadcc04311 (patch) | |
| tree | 04df4f385e3e01a3f278862f190026aa6daca966 /src/libcore/fmt | |
| parent | 1c2fddc6bf6332212fe899c2cb86ae7e645f6eba (diff) | |
| download | rust-73806ddd0fd91066d7b903a00a080cbadcc04311.tar.gz rust-73806ddd0fd91066d7b903a00a080cbadcc04311.zip | |
Use $crate and macro reexport to reduce duplicated code
Many of libstd's macros are now re-exported from libcore and libcollections. Their libstd definitions have moved to a macros_stage0 module and can disappear after the next snapshot. Where the two crates had already diverged, I took the libstd versions as they're generally newer and better-tested. See e.g. d3c831b, which was a fix to libstd's assert_eq!() that didn't make it into libcore's. Fixes #16806.
Diffstat (limited to 'src/libcore/fmt')
| -rw-r--r-- | src/libcore/fmt/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 102836f8d30..b7c225c276a 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -20,12 +20,15 @@ use mem; use option::Option; use option::Option::{Some, None}; use ops::{Deref, FnOnce}; -use result::Result::{Ok, Err}; +use result::Result::Ok; use result; use slice::SliceExt; use slice; use str::{self, StrExt, Utf8Error}; +// NOTE: for old macros; remove after the next snapshot +#[cfg(stage0)] use result::Result::Err; + pub use self::num::radix; pub use self::num::Radix; pub use self::num::RadixFmt; |
