Rollup merge of #110394 - scottmcm:less-idx-new, r=WaffleLapkin
Various minor Idx-related tweaks Nothing particularly exciting here, but a couple of things I noticed as I was looking for more index conversions to simplify. cc https://github.com/rust-lang/compiler-team/issues/606 r? `@WaffleLapkin`
This commit is contained in:
commit
0790996a07
17 changed files with 55 additions and 52 deletions
|
@ -9,14 +9,14 @@ rustc_index::newtype_index! {
|
|||
///
|
||||
/// [`DefId`]: rustc_span::def_id::DefId
|
||||
#[debug_format = "NodeId({})"]
|
||||
pub struct NodeId {}
|
||||
pub struct NodeId {
|
||||
/// The [`NodeId`] used to represent the root of the crate.
|
||||
const CRATE_NODE_ID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
rustc_data_structures::define_id_collections!(NodeMap, NodeSet, NodeMapEntry, NodeId);
|
||||
|
||||
/// The [`NodeId`] used to represent the root of the crate.
|
||||
pub const CRATE_NODE_ID: NodeId = NodeId::from_u32(0);
|
||||
|
||||
/// 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue