File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,25 @@ use rustc_span::ExpnId;
22use std:: fmt;
33
44rustc_index:: newtype_index! {
5+ /// Identifies an AST node.
6+ ///
7+ /// This identifies top-level definitions, expressions, and everything in between.
8+ /// This is later turned into [`DefId`] and `HirId` for the HIR.
9+ ///
10+ /// [`DefId`]: rustc_span::def_id::DefId
511 pub struct NodeId {
612 DEBUG_FORMAT = "NodeId({})"
713 }
814}
915
1016rustc_data_structures:: define_id_collections!( NodeMap , NodeSet , NodeId ) ;
1117
12- /// `NodeId` used to represent the root of the crate.
18+ /// The [ `NodeId`] used to represent the root of the crate.
1319pub const CRATE_NODE_ID : NodeId = NodeId :: from_u32 ( 0 ) ;
1420
1521/// When parsing and doing expansions, we initially give all AST nodes this AST
16- /// node value . Then later, during expansion, we renumber them to have small,
17- /// positive ids .
22+ /// [`NodeId`] . Then later, during expansion, we renumber them to have small,
23+ /// positive IDs .
1824pub const DUMMY_NODE_ID : NodeId = NodeId :: MAX ;
1925
2026impl NodeId {
You can’t perform that action at this time.
0 commit comments