Reserve node_id 0 for the crate top-level module
And define a const to refer to it.
This commit is contained in:
parent
dbfa1b5689
commit
dd9693f211
2 changed files with 12 additions and 9 deletions
|
|
@ -22,6 +22,7 @@ type node_id = int;
|
|||
type def_id = {crate: crate_num, node: node_id};
|
||||
|
||||
const local_crate: crate_num = 0;
|
||||
const crate_node_id: node_id = 0;
|
||||
|
||||
type ty_param = {ident: ident, kind: kind};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue