Commit graph

8297 commits

Author SHA1 Message Date
Graydon Hoare
0622a74c48 Fix long line. 2012-03-28 15:16:32 -07:00
Niko Matsakis
3955b3a41a refactor so that pretty mode tests also run aux-build. Fixes #2060. 2012-03-28 14:59:36 -07:00
Patrick Walton
18a97d71f9 test: Un-XFAIL regions-mock-trans.rs and regions-mock-trans-impls.rs 2012-03-28 14:31:23 -07:00
Graydon Hoare
2aaca455b9 Tidy up multiple declarations and STDC_FOO_MACROS guards in headers. 2012-03-28 14:26:51 -07:00
Patrick Walton
3c398d28a4 rustc: Universally quantify regions when calling functions. Un-XFAIL regions-addr-of-ret.rs. 2012-03-28 14:24:18 -07:00
Tim Chevalier
ca6636d6b6 Allow references to "self" within classes
Allow writing self.f within a class that has a field f. Currently,
the compiler accepts either self.f or f. In a future commit I'll
require writing self.f and not f.

Not sure whether self.f() works if f is a method (making sure that
works next).
2012-03-28 14:19:00 -07:00
Graydon Hoare
c141e7a068 Fix some gcc-4.4-isms, should build now on 4.1+. 2012-03-28 13:52:47 -07:00
Graydon Hoare
b37d7e26fe Update crate URLs to point to interesting things. 2012-03-28 13:52:47 -07:00
Jesse Ruderman
d0ddc69298 Update CC fuzzer 2012-03-28 12:30:07 -07:00
Jesse Ruderman
8d8581e7f9 Update AST fuzzer 2012-03-28 12:29:53 -07:00
Grahame Bowland
232c771105 python scripts run with Python 2.4 (for RHEL5) 2012-03-28 11:29:47 -07:00
Tim Chevalier
52f2a9a1c9 Test case to make sure typestate checks the body of class constructors 2012-03-28 10:38:57 -07:00
Marijn Haverbeke
90cf9e0d6f Make sure type_use.rs doesn't get lost in recursive enums
Closes #2059
2012-03-28 10:35:16 +02:00
Tim Chevalier
edb747ceed Enforce mutability declarations in classes; correct shapes for classes
1. Enforce mutability declarations on class fields. Don't allow any
mutation of class fields not declared as mutable (except inside the
constructor).

2. Handle classes correctly in shape (treat classes like records).
2012-03-27 22:11:58 -07:00
Niko Matsakis
c9102ee7a1 make type_kind exhaustive, add an entry for type_self (in particular) 2012-03-27 15:44:36 -07:00
Brian Anderson
42f2810eca emacs: Make 'mut' a keyword 2012-03-27 15:10:25 -07:00
Brian Anderson
f4ee5582c7 core: Rename iter::to_list to to_vec. Closes #2056 2012-03-27 14:50:33 -07:00
Brian Anderson
ba3292d3be rust: Remove extensions' dependency on the session 2012-03-27 14:16:46 -07:00
Marijn Haverbeke
73d6df32cd Emergency safe-ref-checker maintenance
It still has some big problems, but at least it more or less
understands block arguments now.

Closes #1925
2012-03-27 17:22:57 +02:00
Marijn Haverbeke
b5a4fa9456 Move some code over to iterator-for to see how it performs. 2012-03-27 15:46:33 +02:00
Marijn Haverbeke
cbad6925c1 Register new snapshot 2012-03-27 13:53:11 +02:00
Marijn Haverbeke
eec6383771 Add vec::each, vec::eachi, and list::each
For use with the new for construct.

Issue #1619
2012-03-27 12:53:19 +02:00
Marijn Haverbeke
064f82d68d Support returning from loop blocks
The code is somewhat invasive, but it seems hard to do this in a
clean way, since the design itself involves a bunch of 'action
at a distance'.

Issue #1819
2012-03-27 12:33:13 +02:00
Marijn Haverbeke
f6e3738b9c Support an alternate for syntax that calls a higher-order function
The last argument of the call must be a block, and the type of this
argument must a function returning bool. `break` and `cont` are
supported in the body of the block, and return `false` or `true` from
the function. When the end of the function is reached, `true` is
implicitly returned.

    for vec::all([1, 2, 3]) {|elt|
        if elt == 2 { break; }
        log(error, elt);
    }

Issue #1619
2012-03-27 09:27:31 +02:00
Graydon Hoare
9638e7fece Register new snapshots. 2012-03-26 22:10:02 -07:00
Graydon Hoare
6e6798c4e1 Bulk-edit mutable -> mut. 2012-03-26 18:35:18 -07:00
Graydon Hoare
bd0399863f Disable some advanced (post glibc-2.3) libuv features when building snaps. 2012-03-26 18:03:53 -07:00
Brian Anderson
45a709766c rustc: Begin eliminating ext's dependency on the session 2012-03-26 17:16:26 -07:00
Brian Anderson
a477aaba08 rustc: Move eval_const_expr to its own mod 2012-03-26 17:16:26 -07:00
Patrick Walton
b7a741b5d0 rustc: Combine and unify regions 2012-03-26 15:07:15 -07:00
Patrick Walton
03086c5304 rustc: "unkown" -> "unknown" 2012-03-26 12:53:06 -07:00
Patrick Walton
b86c603bdf rustc: Fix typo in infer 2012-03-26 12:52:31 -07:00
Patrick Walton
d877ebdd05 rustc: Remove obsolete FIXME in infer 2012-03-26 12:49:14 -07:00
Patrick Walton
407be52036 rustc: Generalize resolve_var to work with regions too 2012-03-26 12:42:38 -07:00
Brian Anderson
d92f3ac524 Merge pull request #2054 from j3parker/master
Minor fixes
2012-03-26 12:24:53 -07:00
Tim Chevalier
11610f9ca1 In typeck, don't call ty::store_iface_methods on private methods
This was resulting in a different error message depending on whether
the private method you were trying to call was in the same crate
or a different one.
2012-03-26 10:46:37 -07:00
Niko Matsakis
21111660ca Improve type inference to compute LUB/GLB 2012-03-26 10:34:58 -07:00
Tim Chevalier
2112c391cd Remove stray comment 2012-03-26 10:04:46 -07:00
Tim Chevalier
c282810ab0 Enforce privacy declarations for class fields and methods 2012-03-26 10:00:33 -07:00
Marijn Haverbeke
a00538b3b3 Fix return-in-block in cargo
Which is apparently not built as part of make check
2012-03-26 13:16:29 +02:00
Marijn Haverbeke
b89a5af2ab Check in a forgotten new file 2012-03-26 12:54:06 +02:00
Marijn Haverbeke
87e097a853 Disallow ret inside of block functions
Also adds proper checking for cont/break being inside a loop.

Closes #1854
Issue #1619
2012-03-26 12:45:47 +02:00
Marijn Haverbeke
e4c141a331 Fix bug in generation of non-generic resource dtors
Issue #1944
2012-03-26 11:31:17 +02:00
Niko Matsakis
763142816e repair the build---also, make try/commit work over both ty/region vars 2012-03-25 13:32:13 -07:00
Jacob Parker
f5c91d10dd Fixed vim highlighting for \' (and other) escapes in char literals 2012-03-25 16:26:48 -04:00
Patrick Walton
8462c6c831 rustc: Generalize several parts of infer in preparation for using them for region bounds as well 2012-03-24 23:14:45 -07:00
Niko Matsakis
1d7d5c16b3 correct more broken tests 2012-03-24 22:15:34 -07:00
Niko Matsakis
ac4294a176 add test that was failing from tedh 2012-03-24 21:59:16 -07:00
Niko Matsakis
7ae757ff1a add annotation for variable that used to infer to bot 2012-03-24 21:55:53 -07:00
Niko Matsakis
bf9d714d46 Avoid unifying vars when possible; handle bot (more) correctly 2012-03-24 21:38:43 -07:00