diff options
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 4a4b22c3e12..174851c4fcb 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -31,6 +31,8 @@ type parse_sess = @{ fn next_node_id(sess: parse_sess) -> node_id { let rv = sess.next_id; sess.next_id += 1; + // ID 0 is reserved for the crate and doesn't actually exist in the AST + assert rv != 0; ret rv; } |
