Commit graph

1934 commits

Author SHA1 Message Date
Brian Anderson
633881a562 test: xfail-fast run-pass/classes-simple.rs 2012-03-04 14:13:18 -08:00
Tim Chevalier
e2fa6f03f5 Translate simple classes
Programs using classes with fields only (no methods) compile and run,
    as long as nothing refers to a class in a different crate (todo).

    Also changed the AST representation of classes to have a separate
    record for constructor info (instead of inlining the fields in the
    item_class node), and fixed up spans and pretty-printing for
    classes.
2012-03-04 12:43:17 -08:00
Erick Tryzelaar
f630ebdb6a comp/std: rename io::string_reader to io::str_reader. 2012-03-02 19:15:35 -08:00
Brian Anderson
3ed6f6520f core: Remove _mut functions from vec
Instead, use vec::to_mut/from_mut to transform vectors in place as
needed.
2012-03-02 15:49:49 -08:00
Brian Anderson
a04127d291 test: xfail-fast the cci tests 2012-03-02 13:46:42 -08:00
Brian Anderson
78bfdb11c8 Revert "rust: xfail-fast run-pass/cci_no_inline_exe"
This reverts commit 95099cddcf.
2012-03-02 13:46:02 -08:00
Brian Anderson
09f191f3a7 Revert "test: xfail-fast run-pass/cci_iter.exe"
This reverts commit c0a5e21b29.
2012-03-02 13:45:18 -08:00
Brian Anderson
95099cddcf rust: xfail-fast run-pass/cci_no_inline_exe 2012-03-02 13:44:40 -08:00
Brian Anderson
c0a5e21b29 test: xfail-fast run-pass/cci_iter.exe 2012-03-02 13:36:11 -08:00
Brian Anderson
fd12459d94 test: xfail-fast run-pass/cci_impl_exe 2012-03-02 13:23:55 -08:00
Niko Matsakis
def72bda47 retool inline encoding to handle methods, fix tests 2012-03-02 06:47:25 -08:00
Niko Matsakis
12c68bcd6d make sure we do not bind unique closures (or blocks, for that matter) 2012-03-02 06:47:25 -08:00
Tim Chevalier
48c763c098 Use the correct prestate for calls
The prestate for calls was getting set incorrectly to the poststate for the operator
in the call. This worked before since most of the time, operator expressions are
pure. Issue 1895 shows how this breaks when the operator is a closure that has a
move-in capture clause.

(I had a several-day, multi-file patch for this that didn't work... and then it
turned out to be a one-line fix. The joys of programming.)

Closes #1895
2012-03-01 09:16:26 -08:00
Marijn Haverbeke
072b015515 Add test case for #1894 2012-03-01 10:11:28 +01:00
Niko Matsakis
4132cbd22a un-xfail test, remove old comment 2012-02-29 12:49:15 -08:00
Marijn Haverbeke
0da1aca498 Recognize last uses for copied closed-over variables
And clean up and fix some bad things in last_use.rs.

Closes #1894
2012-02-29 18:06:26 +01:00
Niko Matsakis
1fd9abaa47 rename aux to auxiliary, since aux is apparently reserved on windows 2012-02-28 06:45:33 -08:00
Niko Matsakis
5c1338a18e add ability to run multi-crate tests, run tests with --inline 2012-02-28 06:31:29 -08:00
Tim Chevalier
c28c258f91 Disallow type parameters in the main() function
Closes #1900
2012-02-25 11:06:01 -08:00
Niko Matsakis
274c9708f0 Test for #1374 2012-02-24 21:14:31 -08:00
Graydon Hoare
b44be95e45 Support basic, unsophisticated, somewhat wrong export-globs. 2012-02-23 18:39:14 -08:00
Graydon Hoare
5f4dcb0fa4 Fix comment, add test that export glob works as import glob in scope. 2012-02-23 18:39:13 -08:00
Marijn Haverbeke
780f8277f4 Finish cleanup of core::str
Closes #1849
2012-02-23 17:00:19 +01:00
Kevin Cantu
7782f5d692 (core::str) remove len_bytes alias 2012-02-23 17:00:19 +01:00
Kevin Cantu
98447f5236 (core::str) mostly rename len -> len_chars 2012-02-23 17:00:19 +01:00
Brian Anderson
27ab663845 rustc: Don't ignore attributes inside empty mods. Closes #1655 2012-02-22 21:47:23 -08:00
Brian Anderson
ffa77dd610 test: Add a test for #1696 2012-02-22 21:17:19 -08:00
Brian Anderson
ae23ee28e2 test: Add a test for #1697 2012-02-22 21:14:27 -08:00
Brian Anderson
99a48660d1 rustc: Allow any integral types on rhs of shift ops 2012-02-22 17:26:08 -08:00
Tim Chevalier
4acfcd8c2f Improve error message for use of a non-pure-fn in a pred
Closes #1883
2012-02-22 10:59:52 -08:00
Marijn Haverbeke
1e5266260a Take move captures in account in mutability checker
Closes #1461
2012-02-22 13:35:17 +01:00
Marijn Haverbeke
ffd50b9cdf Make the various from_str functions return options
So that they can be used with user input without causing task
failures.

Closes #1335
2012-02-22 13:18:15 +01:00
Marijn Haverbeke
ad03761a97 Remove preconditions from libraries
Closes #1805
2012-02-22 11:47:47 +01:00
Brian Anderson
77a01054fa rustc: Generate crates with #ast 2012-02-21 15:34:26 -08:00
Brian Anderson
6527fc3925 core: Fix to_str_exact for floats with no decimal component 2012-02-21 14:25:31 -08:00
Brian Anderson
4220dcf1e9 core: New task API 2012-02-20 18:58:04 -08:00
Tim Chevalier
fbc95ba018 Re-XFAIL test that I accidentally 2012-02-20 17:33:35 -08:00
Tim Chevalier
cd9579e079 fix whitespace again 2012-02-20 17:21:33 -08:00
Tim Chevalier
2299d204e4 Further work on resolving and typechecking classes
Class tests aren't working yet, but they fail a little later :-)

Also, make the parser correctly set a constructor's result type to
its enclosing class type.
2012-02-20 17:16:52 -08:00
Graydon Hoare
ef6f628589 Refactor view_path to parse (but not yet process) export globs, unify code paths. 2012-02-17 23:05:20 -08:00
Graydon Hoare
6f70896854 Add new test for export globs, xfailed. 2012-02-17 23:02:27 -08:00
Marijn Haverbeke
e62ddf4898 More rigorous reuse of cleanup sequences
In both landing pads and break/cont/ret unwinding.

Closes #300
2012-02-16 16:37:33 +01:00
Brian Anderson
93b66ee587 test: Assert that the result is correct in run-pass/crust-stress 2012-02-15 12:45:04 -08:00
Brian Anderson
0438e6e924 bench: Add a test for task concurrency 2012-02-15 11:52:43 -08:00
Marijn Haverbeke
1248c250d8 A test that I forgot to git-add 2012-02-15 17:21:03 +01:00
Marijn Haverbeke
67cc89f38d Rewrite exhaustiveness checker
Issue #352
Closes #1720

The old checker would happily accept things like 'alt x { @some(a) { a } }'.
It now properly descends into patterns, checks exhaustiveness of booleans,
and complains when number/string patterns aren't exhaustive.
2012-02-15 15:47:42 +01:00
Marijn Haverbeke
16e5760564 Fix bug in safe-reference checker
At some point, a refactor broke the code that handled local declarations
to no longer descend into the initializer expressions.

Closes #1846
2012-02-15 11:53:32 +01:00
Marijn Haverbeke
6627890f6b Support 'alt check' syntax
It is only a way to flag an alt as intentionally non-exhaustive right now.

Issue #1679
2012-02-15 11:53:32 +01:00
Brian Anderson
9f95ccb426 test: Add a crust function stress test 2012-02-15 01:16:53 -08:00
Kevin Atkinson
d6d7134c37 When parsing a source string, fail when the entire string is not parsed.
(For now only fail when parse_from_source_str is used to avoid
possible compatibility problems; parse_expr_from_source_str still
does not check.)
2012-02-14 19:37:33 -08:00