]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/util/nodemap.rs
Register new snapshots
[rust.git] / src / librustc / util / nodemap.rs
index 7507fd579ebc174e02a5a0e592cf45bb230281a9..bbe3192999af6211cf7abb39bdd3196339b9becf 100644 (file)
 use std::io;
 use syntax::ast;
 
-#[cfg(not(stage0))]
 pub type FnvHashMap<K, V> = HashMap<K, V, FnvHasher>;
 
 pub type NodeMap<T> = FnvHashMap<ast::NodeId, T>;
 pub type DefIdMap<T> = FnvHashMap<ast::DefId, T>;
 
-#[cfg(not(stage0))]
 pub type NodeSet = HashSet<ast::NodeId, FnvHasher>;
-#[cfg(not(stage0))]
 pub type DefIdSet = HashSet<ast::DefId, FnvHasher>;
 
 // Hacks to get good names
-#[cfg(not(stage0))]
 pub mod FnvHashMap {
     use std::hash::Hash;
     use collections::HashMap;
@@ -45,14 +41,12 @@ pub fn new<T>() -> super::DefIdMap<T> {
         super::FnvHashMap::new()
     }
 }
-#[cfg(not(stage0))]
 pub mod NodeSet {
     use collections::HashSet;
     pub fn new() -> super::NodeSet {
         HashSet::with_hasher(super::FnvHasher)
     }
 }
-#[cfg(not(stage0))]
 pub mod DefIdSet {
     use collections::HashSet;
     pub fn new() -> super::DefIdSet {
@@ -60,38 +54,6 @@ pub fn new() -> super::DefIdSet {
     }
 }
 
-#[cfg(stage0)]
-pub type FnvHashMap<K, V> = HashMap<K, V>;
-
-#[cfg(stage0)]
-pub type NodeSet = HashSet<ast::NodeId>;
-#[cfg(stage0)]
-pub type DefIdSet = HashSet<ast::DefId>;
-
-// Hacks to get good names
-#[cfg(stage0)]
-pub mod FnvHashMap {
-    use std::hash::Hash;
-    use collections::HashMap;
-    pub fn new<K: Hash + Eq, V>() -> super::FnvHashMap<K, V> {
-        HashMap::new()
-    }
-}
-#[cfg(stage0)]
-pub mod NodeSet {
-    use collections::HashSet;
-    pub fn new() -> super::NodeSet {
-        HashSet::new()
-    }
-}
-#[cfg(stage0)]
-pub mod DefIdSet {
-    use collections::HashSet;
-    pub fn new() -> super::DefIdSet {
-        HashSet::new()
-    }
-}
-
 /// A speedy hash algorithm for node ids and def ids. The hashmap in
 /// libcollections by default uses SipHash which isn't quite as speedy as we
 /// want. In the compiler we're not really worried about DOS attempts, so we