| Age | Commit message (Collapse) | Author | Lines |
|
Preparation for a lot more metadata refactoring
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
I added a "resolved" version of the ast::constr type -- ty::constr_def
-- that has a def_id field instead of an ann_field. This is more
consistent with other types and eliminates some checking.
Incidentally, I removed the def_map argument to the top-level function
in middle::alias, since the ty::ctxt already has a def_map field.
|
|
|
|
Generate appropriate constraints for calls to functions with
preconditions, and reject calls where those constraints don't
hold true in the prestate.
...by which I mean that it works for one test case :-)
|
|
#459. Close #457.
|
|
resolving crate "use" directives.
Now with extra "works on OSX" kludging.
|
|
Before, all aliases were implicitly mutable, and writing
&mutable was the same as writing &. Now, the two are
distinguished, and assignments to regular aliases are
no longer allowed.
|
|
You'd be surprised.
|
|
resolving crate "use" directives." due to tree bustage
This reverts commit ab3635eebef2b8cf0e19cdbc5b4e8dd7a49a4658.
|
|
them in ty_to_str
|
|
resolving crate "use" directives.
|
|
Changed function types to include a list of constraints. Added
code for parsing and pretty-printing constraints. This necessitated
splitting pprust into two files (pprust and ppaux) to break a
circulate dependency, as ty_to_str now needs to print out constraints,
which may include literals, but pprust depended on ty.
|
|
|
|
type name.
|
|
|
|
|
|
Change ty_fn to have a controlflow field. A 'controlflow' is
essentially a bit of data that says whether or not this function
never returns to the caller (if it never returns, that means it calls
"fail" or another "never-returns" function on every control path).
Also add syntax for annotating functions that never return:
fn foo() -> ! {
fail;
}
for example. Functions marked with ! implicitly have a result type of
ty_bot, which is a new type that this commit also adds.
|
|
start sketching the contains_pointer property on types.
|
|
Except for _task, which is still a keyword.
|
|
|
|
The type/value namespace distinction pretty much works now. Module
namespace is up next.
|
|
This should be a snapshot transition.
|
|
This will need to be a snapshot.
|
|
* Cleans up the algorithm
* Move first pass to walk (second still folds)
* Support part of a type/value namespace split
(crate metadata and module indices still need to be taught about this)
* Remove a few blatant inefficiencies (import tables being recreated for
every lookup, most importantly)
|
|
|
|
and introduce an "either value or alias" mode
|
|
(Have fun mergining your stuff with this.)
|
|
|
|
session, and use it.
|
|
the problem.
This reverts commit d08b443fffb1181d8d45ae5d061412f202dd4118.
|
|
This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
|
|
This giant commit changes the syntax of Rust to use "assert" for
"check" expressions that didn't mean anything to the typestate
system, and continue using "check" for checks that are used as
part of typestate checking.
Most of the changes are just replacing "check" with "assert" in test
cases and rustc.
|
|
|
|
store; prep for removing type annotations
|
|
structures
|
|
|
|
|
|
|
|
|
|
|