Skip to content

Commit

Permalink
Clarify docs for DUMMY_NODE_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Feb 8, 2021
1 parent 2af4a01 commit 0f3e2f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_ast/src/node_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ rustc_data_structures::define_id_collections!(NodeMap, NodeSet, NodeId);
/// The [`NodeId`] used to represent the root of the crate.
pub const CRATE_NODE_ID: NodeId = NodeId::from_u32(0);

/// When parsing and doing expansions, we initially give all AST nodes this AST
/// [`NodeId`]. Then later, during expansion, we renumber them to have small,
/// positive IDs.
/// When parsing and at the beginning of doing expansions, we initially give all AST nodes
/// this dummy AST [`NodeId`]. Then, during a later phase of expansion, we renumber them
/// to have small, positive IDs.
pub const DUMMY_NODE_ID: NodeId = NodeId::MAX;

impl NodeId {
Expand Down

0 comments on commit 0f3e2f6

Please sign in to comment.