about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorKeegan McAllister <kmcallister@mozilla.com>2014-09-15 19:29:47 -0700
committerKeegan McAllister <kmcallister@mozilla.com>2015-01-05 12:00:56 -0800
commit73806ddd0fd91066d7b903a00a080cbadcc04311 (patch)
tree04df4f385e3e01a3f278862f190026aa6daca966 /src/libstd/collections
parent1c2fddc6bf6332212fe899c2cb86ae7e645f6eba (diff)
downloadrust-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/libstd/collections')
-rw-r--r--src/libstd/collections/hash/set.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs
index b1824db93aa..b1906da4355 100644
--- a/src/libstd/collections/hash/set.rs
+++ b/src/libstd/collections/hash/set.rs
@@ -21,7 +21,9 @@ use hash::{Hash, Hasher, RandomSipHasher};
 use iter::{Iterator, IteratorExt, IteratorCloneExt, FromIterator, Map, Chain, Extend};
 use ops::{BitOr, BitAnd, BitXor, Sub};
 use option::Option::{Some, None, self};
-use result::Result::{Ok, Err};
+
+// NOTE: for old macros; remove after the next snapshot
+#[cfg(stage0)] use result::Result::{Ok, Err};
 
 use super::map::{self, HashMap, Keys, INITIAL_CAPACITY};