This reduces some redundancy in the AST data structures and cruft in
the code that works with them. To get a def_id from a node_id, apply
ast::local_def, which adds the local crate_num to the given node_id.
Most code only deals with crate-local node_ids, and won't have to
create def_ids at all.
These errors are non-fatal. The session.abort_if_errors function needs to be
called at strategic points to convert the previous errors to utter failure.
Issue #440
Revert "rustc: Export only what's needed from middle::ty"
This reverts commit 4255d58aa5db2a05362c4435a0e807205e1b8ed7.
Revert "rustc: Make name resolution errors less fatal"
This reverts commit b8ab9ea89c16c60237e7660804f4321f59ae0435.
Revert "rustc: Make import resolution errors less fatal"
This reverts commit 92a8ae94b971206bf0502da3dc5f416fcb24cc36.
Revert "rustc: Export only what's used from middle::resolve"
This reverts commit 4539a2cf7ad99851a165c98ed2f4e4a475cffd7d.
Revert "rustc: Re-introduce session.span_err, session.err"
This reverts commit 7fe9a88e31ae07f2fd89f6715efedd7e3edf49e6.
Revert "rustc: Rename session.span_err -> span_fatal, err -> fatal"
This reverts commit c394a7f49ac29a099994e243017065de2ff97f2a.
These errors are non-fatal. The session.abort_if_errors function needs to be
called at strategic points to convert the previous errors to utter failure.
Issue #440
With the changing of receive semantics the parser has been putting the rhs
expression in the first argument of expr_recv and the lhs in the second, and
all subsequent passes have been referring to them backwords (but still doing
the right thing because they were assuming that lhs was the port and rhs was
the receiver).
This makes all code agree on what lhs and rhs mean for receive expressions.
I noticed that typestate was being lazier than it should be,
because it was only checking typestate for statements and
top-level expression (that is, the expression in a stmt_expr, but
not any subexpressions). So I rewrote the checks in tstate/ck.rs
to use walk, which exposed a few bugs in typestate that I fixed.
Also added some more test cases for if-check.