X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_ast%2Fsrc%2Fast.rs;h=a2d32cdc00fb001b2c03077f9d99ccdf78bd4935;hb=1591dcb659917de87254297073b078b9ade56612;hp=4f55f37e2e964a0f74a0bc1d4240eeb6c3a1a148;hpb=4b37cfc50cb1a909eefe632ea92fb5a2ad8bf240;p=rust.git diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 4f55f37e2e9..a2d32cdc00f 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -510,8 +510,10 @@ pub struct Crate { pub attrs: Vec, pub items: Vec>, pub span: Span, - // Placeholder ID if the crate node is a macro placeholder. - pub is_placeholder: Option, + /// 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.