1616
1717use  hir; 
1818use  hir:: def_id:: { CrateNum ,  DefId ,  DefIndex ,  LOCAL_CRATE ,  DefIndexAddressSpace } ; 
19+ use  ich:: Fingerprint ; 
1920use  rustc_data_structures:: fx:: FxHashMap ; 
2021use  rustc_data_structures:: indexed_vec:: IndexVec ; 
2122use  rustc_data_structures:: stable_hasher:: StableHasher ; 
@@ -34,7 +35,7 @@ use util::nodemap::NodeMap;
3435pub  struct  DefPathTable  { 
3536    index_to_key :  [ Vec < DefKey > ;  2 ] , 
3637    key_to_index :  FxHashMap < DefKey ,  DefIndex > , 
37-     def_path_hashes :  [ Vec < u64 > ;  2 ] , 
38+     def_path_hashes :  [ Vec < Fingerprint > ;  2 ] , 
3839} 
3940
4041// Unfortunately we have to provide a manual impl of Clone because of the 
@@ -55,7 +56,7 @@ impl DefPathTable {
5556
5657    fn  allocate ( & mut  self , 
5758                key :  DefKey , 
58-                 def_path_hash :  u64 , 
59+                 def_path_hash :  Fingerprint , 
5960                address_space :  DefIndexAddressSpace ) 
6061                -> DefIndex  { 
6162        let  index = { 
@@ -79,7 +80,7 @@ impl DefPathTable {
7980    } 
8081
8182    #[ inline( always) ]  
82-     pub  fn  def_path_hash ( & self ,  index :  DefIndex )  -> u64  { 
83+     pub  fn  def_path_hash ( & self ,  index :  DefIndex )  -> Fingerprint  { 
8384        self . def_path_hashes [ index. address_space ( ) . index ( ) ] 
8485                            [ index. as_array_index ( ) ] 
8586    } 
@@ -146,8 +147,8 @@ impl Decodable for DefPathTable {
146147        let  index_to_key_lo:  Vec < DefKey >  = Decodable :: decode ( d) ?; 
147148        let  index_to_key_hi:  Vec < DefKey >  = Decodable :: decode ( d) ?; 
148149
149-         let  def_path_hashes_lo:  Vec < u64 >  = Decodable :: decode ( d) ?; 
150-         let  def_path_hashes_hi:  Vec < u64 >  = Decodable :: decode ( d) ?; 
150+         let  def_path_hashes_lo:  Vec < Fingerprint >  = Decodable :: decode ( d) ?; 
151+         let  def_path_hashes_hi:  Vec < Fingerprint >  = Decodable :: decode ( d) ?; 
151152
152153        let  index_to_key = [ index_to_key_lo,  index_to_key_hi] ; 
153154        let  def_path_hashes = [ def_path_hashes_lo,  def_path_hashes_hi] ; 
@@ -210,7 +211,7 @@ pub struct DefKey {
210211} 
211212
212213impl  DefKey  { 
213-     fn  compute_stable_hash ( & self ,  parent_hash :  u64 )  -> u64  { 
214+     fn  compute_stable_hash ( & self ,  parent_hash :  Fingerprint )  -> Fingerprint  { 
214215        let  mut  hasher = StableHasher :: new ( ) ; 
215216
216217        // We hash a 0u8 here to disambiguate between regular DefPath hashes, 
@@ -221,7 +222,7 @@ impl DefKey {
221222        hasher. finish ( ) 
222223    } 
223224
224-     fn  root_parent_stable_hash ( crate_name :  & str ,  crate_disambiguator :  & str )  -> u64  { 
225+     fn  root_parent_stable_hash ( crate_name :  & str ,  crate_disambiguator :  & str )  -> Fingerprint  { 
225226        let  mut  hasher = StableHasher :: new ( ) ; 
226227        // Disambiguate this from a regular DefPath hash, 
227228        // see compute_stable_hash() above. 
@@ -396,7 +397,7 @@ impl Definitions {
396397    } 
397398
398399    #[ inline( always) ]  
399-     pub  fn  def_path_hash ( & self ,  index :  DefIndex )  -> u64  { 
400+     pub  fn  def_path_hash ( & self ,  index :  DefIndex )  -> Fingerprint  { 
400401        self . table . def_path_hash ( index) 
401402    } 
402403
0 commit comments