| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
It's a constant, anyway.
|
|
src/comp/syntax is currently just a sub-module of rustc, but it will,
in the near future, be its own crate. This includes:
- The AST data structure
- The parser
- The pretty-printer
- Visit, walk, and fold
- The syntax extension system
- Some utility stuff that should be in the stdlib*
*) Stdlib extensions currently require a snapshot before they can be
used, and the win build is very broken right now. This is temporary
and will be cleaned up when one of those problems goes away.
A lot of code was moved by this patch, mostly towards a more organized
layout. Some package paths did get longer, and I guess the new layout
will take some getting used to. Sorry about that!
Please try not to re-introduce any dependencies in syntax/ on any of
the other src/comp/ subdirs.
|
|
Just like it was done with items and exprs. Simplifies some code.
|
|
|
|
This reverts commit 6720ea760df41df82af880b593e5b6023608d6cd.
|
|
|
|
Closes #526
|
|
(Using the * operator.)
This makes tags more useful as nominal 'newtype' types, since you no
longer have to copy out their contents (or construct a cumbersome
boilerplate alt) to access them.
I could have gone with a scheme where you could dereference individual
arguments of an n-ary variant with ._0, ._1, etc, but opted not to,
since we plan to move to a system where all variants are unary (or, I
guess, nullary).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some rather dodgy code was added to trans in the process. I'd love to
discuss it with someone who knows more about types during translation.
|
|
|
|
|
|
|
|
|
|
|
|
Preparation for a lot more metadata refactoring
|
|
This was doing a redundant hashmap lookup. Removing the redundancy trims 5%
(2.8s) off rustc's compile time
|
|
Includes assignment operations. Add regression tests for lots of less useful,
less used or unexpected combinations, as well as a selection of compile-fail
tests. Closes #500 (again!)
|
|
|
|
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.
|
|
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.
|
|
types
|
|
If you use a function expecting an alias argument in a context that
expects a function expecting a value argument, or vice versa, the
previous error message complained that the number of arguments was
wrong. Fixed the error message to be accurate.
|
|
|
|
This is so that subsequent reports about type mismatches get the types
correct.
Issue #516
|
|
module, not just everything exported.
|
|
This code was causing a bounds check failure:
fn hd[U](&vec[U] v) -> U {
fn hd1(&vec[U] w) -> U {
ret w.(0);
}
ret hd1(v);
}
because in hd1, U was being treated as if it referred to a type
parameter of hd1, rather than referring to the lexically enclosing binding
for U that's part of hd.
I'm actually not sure whether this is a legit program or not. But I wanted
to get rid of the bounds check error, so I assumed that program shouldn't
compile and made it a proper error message.
|
|
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.
|
|
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.
|
|
|
|
is working now, so this commit closes #506.
|
|
3x typechecking speedup.
|
|
The list is formidable.
|
|
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.
|
|
The list is formidable.
|
|
Issue #440
|
|
|