| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
The parser needs to parse unconfigured items into the AST so that they can
make the round trip back through the pretty printer, but subsequent passes
shouldn't care about items not being translated. Running a fold pass after
parsing is the lowest-impact way to make this work. The performance seems
fine.
Issue #489
|
|
|
|
|
|
|
|
|
|
crate_cfg will replace eval::env as the mechanism for conditional compilation.
This is a transitional step so they can both exist together.
Issue #489
|
|
This represents the compilation environment, defined as AST meta_items, Used
for driving conditional compilation and will eventually replace the
environment used by the parser for the current conditional compilation scheme.
Issue #489
|
|
|
|
The option can only be toggled at runtime now.
|
|
|
|
Implement "claim" (issue #14), which is a version of "check" that
doesn't really do the check at runtime. It's an unsafe feature.
The new flag --check-claims turns claims into checks automatically --
but it's off by default, so by default, the assertion in a claim
doesn't execute at runtime.
|
|
|
|
|
|
|
|
Resources are now defined like...
resource fd(int n) { close(n); }
Calling fd with an int will then produce a non-copyable value
that, when dropped, will call close on the given int.
|
|
|
|
|
|
|
|
be passed to the "linker". Use that for libc.
|
|
Preparation for a lot more metadata refactoring
|
|
|
|
This will probably need more work, as moving doesn't appear to do
quite the right thing yet in general, and we should also check
somewhere that we're not, for example, moving out the content out of
an immutable field (probably moving out of fields is not okay in
general).
|
|
Non-copyability is not enforced yet, and something is still flaky with
dropping of the internal value, so don't actually use them yet. I'm
merging this in so that I don't have to keep merging against new
patches.
|
|
|
|
Modified typestate to throw away any constraints mentioning a
variable on the LHS of an assignment, recv, assign_op, or on
either side of a swap.
Some code cleanup as well.
|
|
names. Update the typestate code to understand this.
|
|
This in preparation of making 'res' a keyword for defining resources.
Please don't introduce too many new ones in the meantime...
|
|
Since obj constructors and types have different def_ids now,
their def can simply be a def_fn and a def_ty.
|
|
|
|
The implementation is so simple it might be considered cheating: at almost
every step the expr_ternary is just converted to expr_if.
|
|
We decided to use metadata for the more complex cases, and a simple
string is enough for rustc right now.
|
|
|
|
|
|
Examples: #[test], #[link(name = "vers")]
Issue #487
|
|
|
|
|
|
This involved, in part, changing the ast::def type so that a def_fn
has a "purity" field. This lets the typechecker determine whether
functions defined in other crates are pure.
It also required updating some error messages in tests. As a test
for cross-crate constrained functions, I added a safe_slice function
to std::str (slice(), with one of the asserts replaced with a
function precondition) and some test cases (various versions of
fn-constraint.rs) that call it. Also, I changed "fn" to "pred" for
some of the boolean functions in std::uint.
|
|
|
|
|
|
into four separate issues (#538, #539, #540, #543) with corresponding
tests.
|
|
This simplifies the tag variants a bit and makes expr_node_id
obsolete.
|
|
|
|
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.
|
|
This avoid the hardcoded -lstd, allows programs to use other crates and avoids
any differences that may exist in the rustc and ld search logic.
|
|
|
|
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.
|