Commit Graph

18854 Commits

Author SHA1 Message Date
bors
c34c5051a5 auto merge of #6566 : brson/rust/libuv, r=brson
This cherry-picks a fix from upstream. It also includes another libuv patch that we were running but was accidentally removed in a submodule update.
2013-05-17 14:31:25 -07:00
Brian Anderson
b9f77bcd27 Upgrade libuv to fix mac deadlock. #6526 2013-05-17 14:27:25 -07:00
Olivier Saut
3e41639a5e Add a small section on futures to the tutorial 2013-05-17 23:11:49 +02:00
Olivier Saut
7dc466f91f Correct the example given for a future, add punctuation where necessary 2013-05-17 23:11:18 +02:00
bors
ff081980e7 auto merge of #6561 : huonw/rust/rustc-u-int-limit-lint, r=nikomatsakis 2013-05-17 09:10:28 -07:00
Huon Wilson
aa179cb0f1 rustc: relax limits on (u)int type limit lint. Fixes #6130. 2013-05-18 01:49:36 +10:00
gifnksm
3122d8027b libcore: Add IteratorUtil::all, any method 2013-05-18 00:24:43 +09:00
gifnksm
54fbac505e libcore: Add AdditiveIterator, MultiplicativeIterator, OrdIterator 2013-05-18 00:18:09 +09:00
gifnksm
b4cea351ba libcore: Add IteratorUtil::fold, count 2013-05-18 00:17:56 +09:00
gifnksm
02945f1cb1 libcore: Add IteratoUtil::nth, first, last method 2013-05-17 23:49:11 +09:00
gifnksm
9ffbe69234 libcore: Add IteratorUtil::filter_map method 2013-05-17 23:00:48 +09:00
gifnksm
f7e58ebe84 libcore: Add IteratorUtil::to_vec() method 2013-05-17 22:54:32 +09:00
bors
290a2ebab6 auto merge of #6442 : sstewartgallus/rust/incoming, r=pcwalton
Added unit test to prevent similar mistakes from happening again. The
previous method was wrong because it dereferenced a pointer to a void type to
match on the result. No self pointer was needed, and the correct method
signature took the self value by value.

I feel silly that I made this mistake in https://github.com/mozilla/rust/pull/6348
2013-05-17 06:46:32 -07:00
bors
dbbc244f73 auto merge of #6534 : brson/rust/intrinsic-docs, r=bstrie 2013-05-17 05:22:32 -07:00
bors
a3d31f4b80 auto merge of #6550 : Aatch/rust/atomic-load, r=thestinger
This closes #6548

The change makes it match the standard Load signature.
2013-05-17 00:55:29 -07:00
bors
8badea49b0 auto merge of #6549 : bjz/rust/numeric-traits, r=thestinger
As discussed on issue #4819. This is a naive implementation, trusting LLVM to do the relevant optimizations. In the future this could be implemented more efficiently, but it's a start.
2013-05-16 23:43:30 -07:00
bors
c69f8ea91a auto merge of #6093 : alexcrichton/rust/issue-2647, r=thestinger
Closes #2647

This way it's much easier to add lints throughout compilation correctly, and
functions on impls can alter the way lints are emitted. This involved pretty much rewriting how lints are emitted. Beforehand, only items could alter the lint settings, so whenever a lint was added it had to be associated with whatever item id it was coming from. I removed this (possibly questionably) in favor of just specifying a span and a message when adding a lint. When lint checking comes around, it looks at all the lints and sees which node with attributes best encloses it and uses that level of linting. This means that all consumer code doesn't have to deal with what item things came from (especially because functions on impls aren't items). More details of this can be found in the code (and comments).

As a bonus, I managed to greatly simplify emission of lints in resolve.rs about unused imports. Now instead of it manually tracking what the lint level is, it's all moved over into the lint module (as is to be expected).
2013-05-16 22:25:39 -07:00
Alex Crichton
4d44abd52a Change lints to indicate exactly where the level was set 2013-05-17 00:54:03 -04:00
Alex Crichton
1daaf785ab Optimize lint passes to perform far fewer allocations
Achieves ~3x speedup on lint passes for libcore
2013-05-17 00:49:17 -04:00
Alex Crichton
030c666cc1 Re-implement lint with less emphasis on item ids
This way it's much easier to add lints throughout compilation correctly, and
functions on impls can alter the way lints are emitted.
2013-05-17 00:49:16 -04:00
bors
918bfa710c auto merge of #6546 : cmr/rust/warning, r=thestinger 2013-05-16 21:19:38 -07:00
bors
77c98f0815 auto merge of #6523 : cmr/rust/faster_each_permutation, r=luqmana
Closes #5127
2013-05-16 20:04:41 -07:00
Corey Richardson
af54d58891 Update to new for-loop protocol 2013-05-16 22:57:49 -04:00
James Miller
a289dcd187 Fix AtomicLoad builder code 2013-05-17 14:48:24 +12:00
Brendan Zabarauskas
5696081781 Implement sin_cos method for float, f64 and f32 2013-05-17 12:30:02 +10:00
Corey Richardson
c67a85ada1 Remove each_permutation_ref 2013-05-16 22:05:05 -04:00
bors
09bf401f1d auto merge of #6544 : thestinger/rust/new_iter, r=nikomatsakis 2013-05-16 18:58:39 -07:00
Corey Richardson
c2baaa8d84 fix warnings 2013-05-16 21:53:54 -04:00
Daniel Micay
08ef229a65 iter: add fold, sum and product 2013-05-16 21:51:31 -04:00
Corey Richardson
c99d1de85b Update to modern rust 2013-05-16 20:59:06 -04:00
Tommy M. McGuire
5948d8a826 Ensure reverse_part does not access outside given vector 2013-05-16 20:59:06 -04:00
Tommy M. McGuire
2264c7927d Add reverse_part, replace each_permutation, add tests 2013-05-16 20:59:06 -04:00
bors
17970a9111 auto merge of #6545 : catamorphism/rust/unused-import, r=catamorphism 2013-05-16 17:52:40 -07:00
Tim Chevalier
1bf4f90291 rustc: Remove import that is, indeed, not necessary 2013-05-16 17:25:19 -07:00
Tim Chevalier
226f4dfdfb rustc: One less bad copy 2013-05-16 17:02:27 -07:00
bors
f89e00b3d1 auto merge of #6543 : catamorphism/rust/traits-cleanup, r=nikomatsakis
r? @nikomatsakis Impls can implement either zero or one traits; this has been true
more or less since we removed classes. So I got rid of the comments
saying "we should support multiple traits" and changed the code to
make it clear that we don't. This is just cleanup, and doesn't break
any existing tests.
2013-05-16 16:49:37 -07:00
Tim Chevalier
65b7903ba3 rustc: Change ty::get_impl_traits to return an option instead of a vec
Impls can implement either zero or one traits; this has been true
more or less since we removed classes. So I got rid of the comments
saying "we should support multiple traits" and changed the code to
make it clear that we don't. This is just cleanup, and doesn't break
any existing tests.
2013-05-16 15:54:51 -07:00
bors
00eef96a00 auto merge of #6536 : kud1ing/rust/patch-1, r=brson 2013-05-16 13:37:39 -07:00
bors
c8159b3e35 auto merge of #6473 : nikomatsakis/rust/issue-5967-rvalue-immutability, r=pcwalton
Simpler version of PR #5974 based on new borrowck.
2013-05-16 12:34:40 -07:00
Niko Matsakis
63d878f36b correct typo 2013-05-16 15:12:39 -04:00
Niko Matsakis
e665fdfc8e Add two tests for rvalue mutability 2013-05-16 15:10:50 -04:00
Brian Anderson
305331c00f core: Document some intrinsics 2013-05-16 12:03:58 -07:00
bors
cf8341fc9e auto merge of #6457 : nikomatsakis/rust/issue-6308-closure-bounds, r=brson
Add BuiltinBounds to closure type: parse and handle subtyping,
but do not integrate with kindck etc (requires a snapshot first)

r? @brson
2013-05-16 11:31:46 -07:00
Niko Matsakis
035c01af93 Add BuiltinBounds to closure type: parse and handle subtyping,
but do not integrate with kindck etc (requires a snapshot first)
2013-05-16 14:21:02 -04:00
bors
53196bb364 auto merge of #6530 : huonw/rust/deriving-deepclone, r=bstrie 2013-05-16 06:58:52 -07:00
Huon Wilson
47c9157d87 syntax: use fmt! over + in deriving/clone 2013-05-16 23:22:01 +10:00
bors
f19883223c auto merge of #6531 : sammykim/rust/bytes, r=luqmana
Fix #4334.
2013-05-16 05:55:42 -07:00
Huon Wilson
cd2eb4701f syntax: implement #[deriving(DeepClone)]. Fixes #6514. 2013-05-16 22:55:08 +10:00
bors
ce6dc2451f auto merge of #6520 : thestinger/rust/rc, r=pcwalton
This is still enough to prevent cycles (explanation given in the docstring).
2013-05-16 03:25:43 -07:00
kud1ing
f9a15a6976 main() is in ./rustc.rc. use "./../" pattern some more 2013-05-16 13:22:43 +03:00