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
|
@ -27,7 +27,7 @@ impl<'a> Parser<'a> {
|
|||
/// Parses a source module as a crate. This is the main entry point for the parser.
|
||||
pub fn parse_crate_mod(&mut self) -> PResult<'a, ast::Crate> {
|
||||
let (attrs, items, span) = self.parse_mod(&token::Eof)?;
|
||||
Ok(ast::Crate { attrs, items, span, is_placeholder: None })
|
||||
Ok(ast::Crate { attrs, items, span, id: DUMMY_NODE_ID, is_placeholder: false })
|
||||
}
|
||||
|
||||
/// Parses a `mod <foo> { ... }` or `mod <foo>;` item.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue