Reserve node_id 0 for the crate top-level module

And define a const to refer to it.
This commit is contained in:
Marijn Haverbeke 2011-12-16 16:55:22 +01:00
parent dbfa1b5689
commit dd9693f211
2 changed files with 12 additions and 9 deletions

View file

@ -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};