| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
They even have typestate preconditions
|
|
|
|
Adding the #[ignore] attribute will cause the test not to be run, though it
will still show up in the list of tests.
|
|
This reverts commit 8c94d8fd54ba864e6a603ba6d90d41ccfaa62f53.
There's no mechanism to actually return the value from main, so all this does
is allow main -> int to compile. Per #688, the program returns non-zero on
failure, so it's not obvious that this change is appropriate at this time.
|
|
|
|
|
|
correct type
This means if a non-library program leaves out the main program,
the error gets caught earlier than link.
Closes #626.
|
|
|
|
|
|
ret is similar to fail: if not followed by an expression, it
should be parsed as a ret without an argument. The old version would
fail if ret was followed by a close paren (for example). Fixed it.
Closes #676.
|
|
An @ can now be prepended to a pattern to unbox something during
pattern matching.
Closes #661
|
|
on .rc files) and adding an xfail-fast flag for global-scope.rs.
|
|
|
|
|
|
|
|
Capturing a type argument in the enclosing scope should be an error --
this commit implements that check in resolve, avoiding a potential
assertion failure in trans.
Closes #648.
|
|
Typestate was failing to check some code because if it saw an item,
it would quit immediately. This was to avoid checking nested items
in the same context as the lexically enclosing item, but it was
having the wrong effect: not checking the code after the item at all.
Fixed by switching to visit and skipping over items in a proper
nested fashion. Closes #668.
|
|
|
|
parse_sess to session.
|
|
This closes #664.
|
|
A check in trans didn't have a corresponding check in typeck, causing
some programs (to wit, compile-fail/chan-parameterized-args.rs - part of this
commit) to fail with an assertion failure in trans instead of a type error.
Fixed it. In short, arguments that are future thunk arguments (any spawn
arguments, and _ arguments in bind) need to either not contain type params
or type vars, or be by-reference.
Closes #665.
|
|
test case
|
|
Closes #662.
One-line fixes are always the best :-D
|
|
|
|
Closes #576.
|
|
Currently it's only sequential, but it can do word frequency
counting. In an ideal world it would all be polymorphic, but that
pushes the limits of our type system right now. We can generalize it
later.
|
|
As it turns out, the correct way to handle this is much simpler than what I
did originally.
Also add more tests.
|
|
|
|
Closes #469.
|
|
You can now say
expr_move(?dst, ?src) | expr_assign(?dst, ?src) { ... }
to match both expr_move and expr_assign. The names, types, and number
of bound names have to match in all the patterns.
Closes #449.
|
|
explicit return pointers
|
|
|
|
|
|
Somehow this has been disabled forever
|
|
|
|
Instead of noting where the imported things were defined, note where they were
imported. This is more useful and avoids issue #482.
|
|
This has been fixed by a mystery hacker.
|
|
|
|
vectors. Closes #640.
|
|
That is, for example, import x::y::x, which defines a local x,
and thus wouldn't be able to find x::y anymore.
Closes issue #624
|
|
trans::trans_lval will now autobind if the given expression was the
name of a generic functions. Those callees (trans_call and trans_bind)
that are interested in the generics information call trans_lval_gen
now.
|
|
|
|
|
|
Previously, we were creating both a normal vtable entry and a
forwarding function for overriding methods, when they should have just
gotten a vtable entry. This patch fixes that.
|
|
This adds support for dropping cleanups for temporary values when they
are moved somewhere else. It then adds wraps most copy operations
(return, put in data structure, box, etc) in a way that will fall back
to a move when it is safe.
This saves a lot of taking/dropping, shaving over a megabyte off the
stage2/rustc binary size.
In some cases, most notably function returns, we could detect that the
returned value is a local variable, and can thus be safely moved even
though it is not a temporary. This will require putting some more
information in lvals.
I did not yet handle function arguments, since the logic for passing
them looked too convoluted to touch. I'll probably try that in the
near future, since it's bound to be a big win.
|
|
|
|
This will link to std and compile with the --test flag. Eventually the
run-pass/lib* tests will move here.
We could also put the std tests directly into the library and compile both a
library version and a test version, but I think this way will make for faster
builds.
Issue #428
|
|
In 'rec(a = b with c)', if a exists in c then the expected type for b is the
type of c.
|