File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
-
12
11
//! For each definition, we track the following data. A definition
13
12
//! here is defined somewhat circularly as "something with a def-id",
14
13
//! but it generally corresponds to things like structs, enums, etc.
@@ -26,6 +25,10 @@ use syntax::symbol::{Symbol, InternedString};
26
25
use ty:: TyCtxt ;
27
26
use util:: nodemap:: NodeMap ;
28
27
28
+ /// The DefPathTable maps DefIndexes to DefKeys and vice versa.
29
+ /// Internally the DefPathTable holds a tree of DefKeys, where each DefKey
30
+ /// stores the DefIndex of its parent.
31
+ /// There is one DefPathTable for each crate.
29
32
#[ derive( Clone ) ]
30
33
pub struct DefPathTable {
31
34
index_to_key : Vec < DefKey > ,
@@ -110,7 +113,9 @@ impl Decodable for DefPathTable {
110
113
}
111
114
112
115
113
- /// The definition table containing node definitions
116
+ /// The definition table containing node definitions.
117
+ /// It holds the DefPathTable for local DefIds/DefPaths and it also stores a
118
+ /// mapping from NodeIds to local DefIds.
114
119
#[ derive( Clone ) ]
115
120
pub struct Definitions {
116
121
table : DefPathTable ,
You can’t perform that action at this time.
0 commit comments