Commit graph

1946 commits

Author SHA1 Message Date
Patrick Walton
92ed73d0bd rustc: Add pretty printing support for the address-of operator. Un-XFAIL-pretty simple-regions.rs. 2012-03-08 18:10:07 -08:00
Patrick Walton
c40bfec45d test: Add a simple region test, xfail'd in the pretty printer 2012-03-08 17:45:36 -08:00
Tim Chevalier
0c5fdc8745 Rename last to last_opt, last_unsafe to last
As per discussion on IRC. I am about to file an RFC for further
discussion about the more general issue of whether to enforce
invariants through types, typestate, or dynamic checks, but for now,
removing the misleading name "last_unsafe".
2012-03-08 15:25:56 -08:00
Tim Chevalier
ebc1d3e704 Rename last_total to last_unsafe
See Issue 1943 for any discussion (reopen it if necessary).

Closes #1943
2012-03-08 13:07:31 -08:00
Niko Matsakis
2bfed908e3 Fix #1941: inlining of items that themselves contain nested items
The fix is to drop nested items from the encoded AST.  Nested items may
themselves be inlined, but that is an independent question.
2012-03-07 18:06:29 -08:00
Patrick Walton
c9375fed8d stdlib: Stop incurring vtable dispatch costs when hashmaps are used
This required changing almost all users of hashmaps to import the hashmap interface first.

The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 17:35:13 -08:00
Patrick Walton
c245d9e980 Revert "stdlib: Stop incurring vtable dispatch costs when hashmaps are used"
This reverts commit f0250a23d3.
2012-03-07 16:56:45 -08:00
Patrick Walton
f0250a23d3 stdlib: Stop incurring vtable dispatch costs when hashmaps are used
This required changing almost all users of hashmaps to import the hashmap interface first.

The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 16:51:31 -08:00
Tim Chevalier
90ac69904f Improve a type error message (avoid the word 'non-dereferenceable') 2012-03-07 14:14:34 -08:00
Brian Anderson
8a4c8bab84 test: Add test for #979 2012-03-05 18:41:55 -08:00
Brian Anderson
0ee96de4ee rustc: Lower case error messages 2012-03-05 17:05:20 -08:00
Niko Matsakis
8820d4485b print type arguments when pretty-printing all nominal types 2012-03-05 16:47:52 -08:00
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