ast: Always keep a NodeId
in ast::Crate
This makes it more uniform with other expanded nodes
This commit is contained in:
parent
26c9b0046f
commit
55595c5616
11 changed files with 27 additions and 21 deletions
|
@ -510,8 +510,10 @@ pub struct Crate {
|
|||
pub attrs: Vec<Attribute>,
|
||||
pub items: Vec<P<Item>>,
|
||||
pub span: Span,
|
||||
// Placeholder ID if the crate node is a macro placeholder.
|
||||
pub is_placeholder: Option<NodeId>,
|
||||
/// Must be equal to `CRATE_NODE_ID` after the crate root is expanded, but may hold
|
||||
/// expansion placeholders or an unassigned value (`DUMMY_NODE_ID`) before that.
|
||||
pub id: NodeId,
|
||||
pub is_placeholder: bool,
|
||||
}
|
||||
|
||||
/// Possible values inside of compile-time attribute lists.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue