1212
1313use rustc:: dep_graph:: { DepNode , WorkProduct , WorkProductId } ;
1414use rustc:: hir:: def_id:: DefIndex ;
15+ use rustc:: hir:: map:: DefPathHash ;
1516use rustc:: ich:: Fingerprint ;
1617use rustc:: middle:: cstore:: EncodedMetadataHash ;
1718use std:: sync:: Arc ;
1819use rustc_data_structures:: fx:: FxHashMap ;
1920
20- use super :: directory:: DefPathIndex ;
21-
2221/// Data for use when recompiling the **current crate**.
2322#[ derive( Debug , RustcEncodable , RustcDecodable ) ]
2423pub struct SerializedDepGraph {
@@ -27,7 +26,7 @@ pub struct SerializedDepGraph {
2726 /// These are output nodes that have no incoming edges. We track
2827 /// these separately so that when we reload all edges, we don't
2928 /// lose track of these nodes.
30- pub bootstrap_outputs : Vec < DepNode < DefPathIndex > > ,
29+ pub bootstrap_outputs : Vec < DepNode < DefPathHash > > ,
3130
3231 /// These are hashes of two things:
3332 /// - the HIR nodes in this crate
@@ -55,14 +54,14 @@ pub struct SerializedDepGraph {
5554/// outgoing edges from a single source together.
5655#[ derive( Debug , RustcEncodable , RustcDecodable ) ]
5756pub struct SerializedEdgeSet {
58- pub source : DepNode < DefPathIndex > ,
59- pub targets : Vec < DepNode < DefPathIndex > >
57+ pub source : DepNode < DefPathHash > ,
58+ pub targets : Vec < DepNode < DefPathHash > >
6059}
6160
6261#[ derive( Debug , RustcEncodable , RustcDecodable ) ]
6362pub struct SerializedHash {
6463 /// def-id of thing being hashed
65- pub dep_node : DepNode < DefPathIndex > ,
64+ pub dep_node : DepNode < DefPathHash > ,
6665
6766 /// the hash as of previous compilation, computed by code in
6867 /// `hash` module
@@ -115,5 +114,5 @@ pub struct SerializedMetadataHashes {
115114 /// is only populated if -Z query-dep-graph is specified. It will be
116115 /// empty otherwise. Importing crates are perfectly happy with just having
117116 /// the DefIndex.
118- pub index_map : FxHashMap < DefIndex , DefPathIndex >
117+ pub index_map : FxHashMap < DefIndex , DefPathHash >
119118}
0 commit comments