12
12
13
13
use rustc:: dep_graph:: { DepNode , WorkProduct , WorkProductId } ;
14
14
use rustc:: hir:: def_id:: DefIndex ;
15
+ use rustc:: hir:: map:: DefPathHash ;
15
16
use rustc:: ich:: Fingerprint ;
16
17
use rustc:: middle:: cstore:: EncodedMetadataHash ;
17
18
use std:: sync:: Arc ;
18
19
use rustc_data_structures:: fx:: FxHashMap ;
19
20
20
- use super :: directory:: DefPathIndex ;
21
-
22
21
/// Data for use when recompiling the **current crate**.
23
22
#[ derive( Debug , RustcEncodable , RustcDecodable ) ]
24
23
pub struct SerializedDepGraph {
@@ -27,7 +26,7 @@ pub struct SerializedDepGraph {
27
26
/// These are output nodes that have no incoming edges. We track
28
27
/// these separately so that when we reload all edges, we don't
29
28
/// lose track of these nodes.
30
- pub bootstrap_outputs : Vec < DepNode < DefPathIndex > > ,
29
+ pub bootstrap_outputs : Vec < DepNode < DefPathHash > > ,
31
30
32
31
/// These are hashes of two things:
33
32
/// - the HIR nodes in this crate
@@ -55,14 +54,14 @@ pub struct SerializedDepGraph {
55
54
/// outgoing edges from a single source together.
56
55
#[ derive( Debug , RustcEncodable , RustcDecodable ) ]
57
56
pub struct SerializedEdgeSet {
58
- pub source : DepNode < DefPathIndex > ,
59
- pub targets : Vec < DepNode < DefPathIndex > >
57
+ pub source : DepNode < DefPathHash > ,
58
+ pub targets : Vec < DepNode < DefPathHash > >
60
59
}
61
60
62
61
#[ derive( Debug , RustcEncodable , RustcDecodable ) ]
63
62
pub struct SerializedHash {
64
63
/// def-id of thing being hashed
65
- pub dep_node : DepNode < DefPathIndex > ,
64
+ pub dep_node : DepNode < DefPathHash > ,
66
65
67
66
/// the hash as of previous compilation, computed by code in
68
67
/// `hash` module
@@ -115,5 +114,5 @@ pub struct SerializedMetadataHashes {
115
114
/// is only populated if -Z query-dep-graph is specified. It will be
116
115
/// empty otherwise. Importing crates are perfectly happy with just having
117
116
/// the DefIndex.
118
- pub index_map : FxHashMap < DefIndex , DefPathIndex >
117
+ pub index_map : FxHashMap < DefIndex , DefPathHash >
119
118
}
0 commit comments