Commit Graph

2716 Commits

Author SHA1 Message Date
Patrick Walton
93c2f5e0e4 rustc: Use coherence for operator overloading.
The only use of the old-style impls is now placement new.
2012-07-27 19:35:24 -07:00
Tim Chevalier
f7382c454f Forbid duplicate fields in record types and exprs
Closes #3033
2012-07-27 17:33:05 -07:00
Tim Chevalier
a0d05844ed Correctly forbid upvars in nested impls, traits and classes
Previously, resolve was allowing impls, traits or classes that were
nested within a fn to refer to upvars, as well as referring to type
parameters bound by the fn. Fixing this required adding a new kind of
def: def_typaram_binder, which can refer to any of an impl, trait or
class that has bound ty params. resolve uses this to enforce that
methods can refer to their parent item's type parameters, but not to
outer items' type parameters; other stages ignore it. I also made
sure that impl, trait and class methods get checked inside a
MethodRibKind thing so as to forbid upvars, and changed the definition
of MethodRibKind so that its second argument is an optional node_id
(so that required trait method signatures can be checked with a
MethodRibKind as well).
2012-07-27 17:31:42 -07:00
Niko Matsakis
638491712e change region inference to not consider & that appears in a fn
type as indicating region parameterization
2012-07-27 15:49:03 -07:00
Brian Anderson
2407373fa4 core: Make #fmt pure 2012-07-27 15:11:22 -07:00
Tim Chevalier
b6aadf56c8 In resolve, check for duplicate pattern-bound vars
Closes #3038
2012-07-27 13:35:17 -07:00
Tim Chevalier
300f54ebc0 Make alts on uninhabited enum types typecheck and translate properly
Possibly one of the silliest Rust commits ever.

Closes #3037
2012-07-27 13:14:03 -07:00
Eric Holk
3c731df890 re-xfailing pingpong 2012-07-26 17:11:04 -07:00
Eric Holk
79f5d62d47 Added .peek for recv_packets 2012-07-26 17:10:48 -07:00
Eric Holk
c918bd01b0 Fix borrow check errors in k-nucleotide. 2012-07-26 17:10:48 -07:00
Eric Holk
65beca4e01 Use iteration protocol for ebml, use vec::view in more places (issue #2880) 2012-07-26 17:10:48 -07:00
Graydon Hoare
dbbaa50290 Nomenclature fixes in the lint checker. Fewer double-negatives.
New style is allow(foo), warn(foo), deny(foo) and forbid(foo),
mirrored by -A foo, -W foo, -D foo and -F foo on command line.

These replace -W no-foo, -W foo, -W err-foo, respectively.

Forbid is new, and means "deny, and you can't override it".
2012-07-26 17:08:33 -07:00
Damian Gryski
74d60a619a shootout-mandelbrot: devnull writer needs get_type impl 2012-07-26 17:05:13 -07:00
Paul Stansifer
97422f0f0f Merge branch 'incoming' of github.com:mozilla/rust 2012-07-26 16:16:28 -07:00
Tim Chevalier
20c6f3c37a Add xfailed test case for #3029 2012-07-26 14:51:10 -07:00
Tim Chevalier
c8ea9fc4c3 Re-added test for Issue 935 -- not sure what happened to it 2012-07-26 14:47:30 -07:00
Tim Chevalier
d19b915bc4 Add test for issue 868 2012-07-26 14:29:47 -07:00
Paul Stansifer
f4c093c4af Change #macro to macro_rules! in some cases. 2012-07-26 10:14:01 -07:00
Graydon Hoare
f8dc9283ad Reject non-UTF-8 files when reading as str. Close #2918. 2012-07-25 15:34:18 -07:00
Eric Holk
531ea695f6 Remove shared_arc (unused) and fix trivial-message 2012-07-25 15:15:46 -07:00
Eric Holk
08a77e06a8 Rewrite task-comm-NN to use pipes 2012-07-25 15:15:46 -07:00
Graydon Hoare
43867bf6f3 Merge pull request #3014 from elliottslaughter/fix-failed-build-by-xfailing-tests
Fix build by xfailing tests which produce irreducible CFGs.
2012-07-25 14:50:02 -07:00
Elliott Slaughter
9ca2a11137 Fix build by xfailing tests which produce irreducible CFGs. 2012-07-25 14:42:37 -07:00
Eric Holk
6748f78cb1 Polymorphic protocols work well enough to do MapReduce.
I did some horrible things with type variable naming here. It should do the right thing in most cases, but we'll need to go through and make it correct someday.
2012-07-25 12:12:26 -07:00
Eric Holk
f5be06fa1f Added infrastructure to spin for a bit on recv. A spin count > 0 makes bench/pingpong.rs about 10x faster, but makes msgsend-ring-pipes unbearably slow. 2012-07-25 12:12:25 -07:00
Eric Holk
35576168dc Added a benchmark of bounded vs unbounded. Bounded is 8-12% faster. The macros currently don't work without pretty printing first. 2012-07-25 12:12:25 -07:00
Eric Holk
7f5f1f90a0 Compiled a bounded version of pingpong.
There are some failures in the other pipe tests, but these seem to just be a matter of generalizing the library code.

Updating pipes library so all tests pass again
2012-07-25 12:12:25 -07:00
Eric Holk
c28af26258 Refactor the bounded pingpong example to avoid needing to generate unsafe code.
Took some steps towards bounded codegen.
2012-07-25 12:12:25 -07:00
Eric Holk
4f29814f2a Hand-written bounded pingpong implementation. 2012-07-25 12:12:25 -07:00
Eric Holk
f65d6026ef Started playing with macros to make receiving easier 2012-07-25 12:12:25 -07:00
Graydon Hoare
1e241b5abd Merge pull request #3009 from elliottslaughter/utf8-idents-test-fix
Fix test floating point comparison to tolerate imprecise FPUs.
2012-07-25 10:20:40 -07:00
Niko Matsakis
99674dc52b avoid capture of bound regions when infering types for closure
expressions. cc #2981
2012-07-25 05:45:52 -07:00
Niko Matsakis
168306f11b correct treatment of mutability for deref'd components
Fixes #2980
2012-07-25 05:45:52 -07:00
Patrick Walton
22ef08293e test: Add a max/min classes test case 2012-07-24 16:39:26 -07:00
Elliott Slaughter
1e27d1994f Fix test floating point comparison to tolerate imprecise FPUs. 2012-07-24 16:15:30 -07:00
Eric Holk
d948254ccb Fix xfail comment 2012-07-24 14:56:59 -07:00
Eric Holk
22e3a8506f Test case for #3005 2012-07-24 14:56:02 -07:00
Graydon Hoare
8868b222c3 Fix whitespace. 2012-07-24 13:21:25 -07:00
Graydon Hoare
a63e0e47f0 Update some str functions to slices, merge as_buf and unpack_slice. 2012-07-24 12:35:52 -07:00
Erick Tryzelaar
6d042c0f2d tests: Rename to avoid colliding with real rust-zmq. 2012-07-23 17:15:30 -07:00
Ben Blum
b30a58abe2 Convert bench and run-pass tests to new task_builder interface 2012-07-23 20:09:17 -04:00
Ben Blum
80f4e9f2ec Oops, xfail-win32 task-killjoin-rsrc 2012-07-23 17:36:03 -04:00
Ben Blum
81f108154a Fix and un-xfail task-killjoin-rsrc.rs 2012-07-23 16:15:12 -04:00
Ben Blum
d0fb85359a Add task::spawn_unlinked and start migrating away from task::unsupervise 2012-07-23 16:06:29 -04:00
Elliott Slaughter
de82a9be61 Move fail upcall into rust libcore. 2012-07-23 10:45:58 -07:00
Niko Matsakis
f676547c97 Fix intersection of two region params in infer, cc #2962 2012-07-19 10:14:16 -07:00
Patrick Walton
978ca03cb2 Revert "accept naked exprs with commas in pattern arms" due to pretty-printing failures
This reverts commit f712b2d76b.

In alt arms, the parser needs to do a little lookahead to determine
whether it's looking at a record literal or a block.

Also there are some indentation issues in the expected source.
2012-07-19 07:53:55 -07:00
Patrick Walton
00aa5f163f test: XFAIL some more in an effort to unbreak the tree 2012-07-19 07:30:37 -07:00
Patrick Walton
f82db5d136 test: Change the expected error message on iface-test.rs to contain "trait" instead of "interface" 2012-07-18 20:42:14 -07:00
Patrick Walton
6cb38aeb43 test: XFAIL issue-1466.rs due to cycle collector crashes.
I don't want to do this, but the tree has been in a state of chaos for days
and it's not clear what can be backed out to fix this test.
2012-07-18 20:39:56 -07:00