Brian Anderson
51e6df689c
rustc: Allow the test runner to run unexported tests
2012-01-05 18:16:56 -08:00
Brian Anderson
c2c497ff53
rustc: Configure out #[test] functions when not testing
2012-01-05 17:31:57 -08:00
Niko Matsakis
f832edc369
require a non-semi expr acting as a stmt to have unit return type
2012-01-05 10:44:38 -08:00
Marijn Haverbeke
60ae1590af
Switch to new param kind bound syntax
...
And remove support for the old syntax
2012-01-05 15:50:02 +01:00
Niko Matsakis
aa5382bb13
split proto from fn_decl, as not all fn_decls know the proto.
...
this will address the (crashing) new test added.
2011-12-29 20:29:28 -08:00
Graydon Hoare
dcd771cd48
Merge branch 'master' of github.com:graydon/rust
2011-12-22 14:50:52 -08:00
Graydon Hoare
8b580954fe
Register snapshots and switch logging over to use of log_full or #error / #debug.
2011-12-22 14:42:52 -08:00
Marijn Haverbeke
0490c36143
Unify some data structures in syntax::ast that were doing the same thing
...
As a preparation to removing some duplication in typeck.
2011-12-22 20:18:56 +01:00
Niko Matsakis
b2b2a430df
resolve capture clauses
2011-12-19 14:07:46 -08:00
Niko Matsakis
2833ca478c
reorder args to the various vec, option fns so blk comes last
2011-12-16 07:17:23 -08:00
Niko Matsakis
1869306a7e
change syntax from lambda[send] to sendfn
2011-12-14 14:32:24 -08:00
Niko Matsakis
aa1cd61c84
push changes through to get things compiling, if not running.
2011-12-14 14:32:18 -08:00
Graydon Hoare
fa9ad984fb
Copy first batch of material from libstd to libcore.
2011-12-13 16:34:50 -08:00
Graydon Hoare
03d4ec5415
Fix next-node-id "hackasaurus" in comp/front/test.rs.
2011-12-06 14:40:30 -08:00
Marijn Haverbeke
b40c6773c2
Box ast::path values
...
It seems inefficient to copy them around. Let's measure whether that's actually
> the case
2011-11-30 13:38:38 +01:00
Marijn Haverbeke
e98286b594
Allow import directives in any block
...
Closes #49
2011-11-23 20:57:34 +01:00
Marijn Haverbeke
f6491bb426
Update stdlib, compiler, and tests to new kind system
...
This involved adding 'copy' to more generics than I hoped, but an
experiment with making it implicit showed that that way lies madness --
unless enforced, you will not remember to mark functions that don't
copy as not requiring copyable kind.
Issue #1177
2011-11-18 12:49:01 +01:00
Niko Matsakis
adc79e2f44
remove compile-command from local variable blocks
2011-11-17 11:46:13 -08:00
Haitao Li
5a7249c935
Cleanup unused imports
2011-11-10 19:19:40 -08:00
Matt Brubeck
76077a9fb7
Add should_fail annotation for unit tests
...
This allows test cases to assert that a function is expected to fail.
Tests annotated with "should_fail" will succeed only if the function
fails.
2011-11-01 16:55:39 -07:00
Brian Anderson
f7ebe23ae1
Add the ability to ignore tests by compiler config
...
[test]
[ignore(cfg(target_os = "win32"))]
2011-10-29 18:30:32 -07:00
Marijn Haverbeke
cfdf193c46
Update our code to new type parameter kind syntax
...
Closes #1067
2011-10-25 15:56:55 +02:00
Marijn Haverbeke
7114702496
Change the way block calls are parsed, mark them as block-calls.
...
This makes it possible to omit the semicolon after the block, and will
cause the pretty-printer to properly print such calls (if
pretty-printing of blocks wasn't so broken). Block calls (with the
block outside of the parentheses) can now only occur at statement
level, and their value can not be used. When calling a block-style
function that returns a useful value, the block must be put insde the
parentheses.
Issue #1054
2011-10-21 14:24:14 +02:00
Brian Anderson
d24894e181
Remove unused empty_fn_ty from rustc::front::test
2011-10-20 20:54:12 -07:00
Brian Anderson
9efdd0f326
Merge ast::proto_shared and ast::proto_closure
...
Now they are both just proto_shared and proto_shared takes an
argument indicating that it is sugared as 'lambda'
2011-10-20 18:23:48 -07:00
Brian Anderson
4b30a06abe
Rename ast::proto_fn to ast::proto_shared
2011-10-20 18:23:48 -07:00
Brian Anderson
29ad3bdb10
Make fn denote a bare function. Convert fn to fn@ as needed
2011-10-20 18:23:48 -07:00
Brian Anderson
3b54dcfa79
Convert the test runners to typesafe spawn
...
Issue #1022
2011-10-20 18:23:47 -07:00
Niko Matsakis
9f9deff7af
make a good error msg if you try to use an unsafe fn for a test
2011-10-12 16:33:07 -07:00
Niko Matsakis
b1a9d71218
improve the span used in test generation
2011-10-12 16:33:07 -07:00
Niko Matsakis
cbe8da0655
make treatment of unchecked/unsafe blocks more uniform
...
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
2011-10-12 14:39:24 -07:00
Niko Matsakis
29584cc5ac
Extend the unchecked block stuff to allow unsafe blocks as well.
2011-10-12 14:26:47 -07:00
Marijn Haverbeke
b4bae8fea5
Make vectors and strings immediates again
...
There's no good reason to force them to be spilled anymore. Some
pieces of trans become more elegant this way, and less stack allocs
and load/stores are needed.
Issue #1021
2011-10-10 15:59:16 +02:00
Marijn Haverbeke
fe916fb9f0
Give up on providing a by-value version of map, convert fold over to
...
passing pointers by ref
Issue #1008
2011-10-07 09:56:12 +02:00
Marijn Haverbeke
f9fbd86f52
Parse and typecheck by-value and by-ref arg specs
...
Add sprinkle && throughout the compiler to make it typecheck again.
Issue #1008
2011-10-07 09:09:50 +02:00
Brian Anderson
b1bf9ef5ae
Break fold's circular reference during unwinding
...
This converts the AST fold into a resource that breaks it's own circular
reference (just a temporary workaround until GC), so that failure during fold
will unwind correctly.
Issue #936
2011-09-19 15:32:56 -07:00
Marijn Haverbeke
f8a35234ad
Remove autoderef for calls
...
We were only using it in a single place, and there for no discernable reason
(probably as part of the bare-fn-vals-are-not-copyable plan). It seems more
surprising than useful.
2011-09-16 14:39:30 +02:00
Marijn Haverbeke
6eb9738a66
Rename ast::controlflow to ast::ret_style
...
It will include information about returning by alias.
2011-09-14 10:38:23 +02:00
Graydon Hoare
a4815b6742
Factor imports mindlessly.
2011-09-12 16:13:28 -07:00
Marijn Haverbeke
fc6b7c8b38
Reformat for new mode syntax, step 1
...
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00
Marijn Haverbeke
0e6e56ca60
Make the names of the arg mode tag reflect their (revised) meaning
2011-09-12 11:07:17 +02:00
Brian Anderson
f1555e2ca8
Rename ty_istr to ty_str. Issue #855
2011-09-02 22:11:46 -07:00
Brian Anderson
5c49e4f4e9
Reformat. Issue #855
2011-09-02 22:11:42 -07:00
Brian Anderson
9c173f17c0
Remove lots of estr code from rustc. Issue #855
2011-09-01 23:25:33 -07:00
Brian Anderson
418d09e547
Convert all uses of #ifmt to #fmt. Issue #855
2011-09-01 18:54:03 -07:00
Brian Anderson
ab6bb035e5
Rename std::istr to std::str. Issue #855
2011-09-01 17:27:58 -07:00
Brian Anderson
6b22640a1f
Convert std::test to istrs. Issue #855
2011-09-01 12:14:31 -07:00
Brian Anderson
498e38b705
Convert uses of #fmt to #ifmt. Issue #855
2011-08-31 11:44:06 -07:00
Brian Anderson
9fb085560d
Convert rustc::syntax::ast_util to istrs. Issue #855
2011-08-27 15:54:46 -07:00
Brian Anderson
cbad23a747
Convert pretty-printer to istrs. Issue #855
2011-08-27 15:54:46 -07:00