Commit graph

18956 commits

Author SHA1 Message Date
bors
b8fa9d3be1 auto merge of #7015 : huonw/rust/each-fn-kill, r=thestinger
Continuation of #6995/#6999.
2013-06-08 10:25:15 -07:00
Huon Wilson
98ba91f81b remove unused import warnings 2013-06-09 02:22:23 +10:00
Huon Wilson
00f5916809 std: replace the str::each* fns/methods with byte iterators 2013-06-09 02:22:23 +10:00
Huon Wilson
4b806b4d06 std: remove each_char* fns and methods from str, replaced by iterators. 2013-06-09 02:22:23 +10:00
Huon Wilson
513d2292e5 std: remove foldr and alli methods in vec 2013-06-09 02:22:23 +10:00
Huon Wilson
ed299af625 std: remove fold[lr] in favour of iterators 2013-06-09 02:22:23 +10:00
Huon Wilson
65c7c58c8f std: remove {all*,any*,count} in favour of iterators 2013-06-09 02:22:23 +10:00
Huon Wilson
ce4f63dcee std: add reverse vec iterators, replace vec::each*_reverse. 2013-06-09 02:22:23 +10:00
bors
e2ec8e71ce auto merge of #7008 : thestinger/rust/iterator, r=catamorphism
The `IteratorUtil` trait hits a bug in method resolve, but the basic trait has no issue.
2013-06-08 02:28:15 -07:00
Ramkumar Ramachandra
8b87debbc2 configure: replace echo "" with plain echo
When no arguments are given, echo prints a blank line.  These two are
equivalent:

  $ echo ""
  $ echo

Replace the former by the latter.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-08 14:13:37 +05:30
bors
8db1d2cdde auto merge of #7007 : thestinger/rust/jemalloc, r=catamorphism
It's still broken because `jemalloc`'s `configure` script doesn't work when the build triple doesn't match the target triple due to missing a way to get the page size. I'm not entirely sure how to pass a hardcoded value to autoconf/configure.

This at least gets it a bit further along.
2013-06-08 01:31:18 -07:00
Philipp Brüschweiler
a99ba1180d rustc::regionck: fix ICE when getting signature of ty_err
Fixes #5062
2013-06-08 09:34:47 +02:00
Philipp Brüschweiler
c74f39782f Add test for #5062 2013-06-08 09:34:38 +02:00
Philipp Brüschweiler
f3f9db133a rustc: Fix an ICE "Autoderef but type not derefable"
Related to #5062 (same error message), but that test case causes
a different ICE than mentioned there (even without this fix).
2013-06-08 09:34:32 +02:00
Philipp Brüschweiler
c786b68dd3 Add a test that causes an ICE currently 2013-06-08 09:34:25 +02:00
bors
1d06aea0b7 auto merge of #7005 : dotdash/rust/fix_get_str_from, r=bstrie
As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
2013-06-08 00:34:22 -07:00
bors
1cf57f7b67 auto merge of #7003 : alco/rust/tutorial-block-expr, r=bstrie
This is something that's only been briefly mentioned in the beginning of
the tutorial and all of the closure examples within this subsection
include only one expression between { and }.
2013-06-07 23:40:25 -07:00
bors
88517f9874 auto merge of #7000 : Blei/rust/fix-6155, r=catamorphism 2013-06-07 22:46:25 -07:00
bors
3fc0524818 auto merge of #6920 : catamorphism/rust/issue-4765, r=bstrie
r? anybody As per #4765
2013-06-07 21:13:31 -07:00
bors
e34756c9ba auto merge of #6695 : catamorphism/rust/moretestcases, r=catamorphism 2013-06-07 19:55:32 -07:00
Tim Chevalier
aac1298122 testsuite: Add test cases that pass 2013-06-07 19:37:29 -07:00
Daniel Micay
d27ba09245 add the Iterator trait to the prelude 2013-06-07 22:23:48 -04:00
Björn Steinbrink
2096d79626 Avoid unnecessary allocations in the metadata decoder 2013-06-08 03:27:48 +02:00
Björn Steinbrink
43cae88079 Lexer: Fix offset handling in get_str_from()
As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
2013-06-08 03:24:47 +02:00
Björn Steinbrink
29e5aa0942 Remove some unnecessary closures 2013-06-08 03:24:47 +02:00
Björn Steinbrink
b65dc42b25 TypeChecker: Avoid unnecessary copies 2013-06-08 03:24:47 +02:00
Björn Steinbrink
de1df3608b Lexer: Avoid unnecessary allocations 2013-06-08 03:24:47 +02:00
Björn Steinbrink
96798f5e05 tydecode: Accept a plain borrowed pointer to the data 2013-06-08 03:24:47 +02:00
Björn Steinbrink
51e85f5e6e Avoid unnecessary heap allocations in the metadata ty decoder 2013-06-08 03:24:47 +02:00
Björn Steinbrink
b870477897 Avoid unnecessary (re-)allocations in the lexer 2013-06-08 03:24:47 +02:00
Alexei Sholik
93b2ddfc88 A reminder that a block is a single expr in closures
This is something that's only been briefly mentioned in the beginning of
the tutorial and all of the closure examples within this subsection
include only one expression between { and }.
2013-06-08 04:10:50 +03:00
bors
9b0986acf4 auto merge of #7001 : alco/rust/tutorial-for-loop, r=bstrie
The "4.3 Loops" section only describes `while` and `loop`. We then see `for`
used in a code sample at the end of the "13. Vectors and strings" section,
but it's explained for the first time only in the next section --
"14. Closures".

It is worth mentioning it in "4.3 Loops".

---

Feel free to reword it and commit yourself if you don't like my wording.
2013-06-07 17:43:32 -07:00
Tim Chevalier
239b81f111 std: Change str::from_bytes to raise a condition on invalid input
As per #4765
2013-06-07 17:42:50 -07:00
Alexei Sholik
83b68a2f69 Mention for in the section on loops
The "4.3 Loops" section only describes `while` and `loop`. We then see `for`
used in a code sample at the end of the "13. Vectors and strings" section,
but it's explained for the first time only in the next section --
"14. Closures".

It is worth mentioning it in "4.3 Loops".
2013-06-08 03:17:56 +03:00
Daniel Micay
a593d8f67c pass correct flags to jemalloc for cross-compiling 2013-06-07 18:27:15 -04:00
Philipp Brüschweiler
080a462050 rustc::typeck: fix array out of bounds
Fixes #6155
2013-06-07 22:09:01 +02:00
Philipp Brüschweiler
320995198c Add test for #6155 2013-06-07 22:08:54 +02:00
bors
b8cf2f8056 auto merge of #6999 : thestinger/rust/each-fn-kill, r=thestinger 2013-06-07 11:55:36 -07:00
Daniel Micay
07e4d69baa iterator: work around method resolve bug (#5898) 2013-06-07 14:50:06 -04:00
Daniel Micay
d945543ebf Merge branch 'each-fn-kill' of https://github.com/huonw/rust into each-fn-kill 2013-06-07 14:43:02 -04:00
Huon Wilson
54d914a9a9 std: remove each[i]_mut functions, in favour of iterators. 2013-06-08 03:24:27 +10:00
bors
18019a1304 auto merge of #6990 : huonw/rust/const-eval, r=bstrie
This fail! caused ICEs, but was trivial to convert to a useful error message.
2013-06-07 08:55:33 -07:00
Huon Wilson
bc81d279fa rustc: Convert a fail! to a useful error message. 2013-06-08 01:46:49 +10:00
Huon Wilson
f661a15b2b std: remove vec::each2 and vec::each2_mut in favour of iterators 2013-06-08 01:20:47 +10:00
Huon Wilson
5e9f006c5b std: more dummy type parameters on iterators to work around #6967. 2013-06-08 01:10:27 +10:00
bors
0d0c004b81 auto merge of #6988 : huonw/rust/deriving-changes, r=bstrie
Several minor changes:
 - The clean-up I mentioned in #6851 (moving functions from deriving/mod.rs to deriving/generic.rs)
 - Move `expand_generic_deriving` to a method
 - Reimplement `deriving(Ord)` with no dependence on `Eq`
2013-06-07 06:58:33 -07:00
Huon Wilson
a965f4981a syntax: correct the modifications to deriving(Ord) so that it works. 2013-06-07 22:36:57 +10:00
Huon Wilson
ebf7281b7b syntax: rewrite deriving(Ord) to not require Eq.
lt and gt are implement directly in terms of the corresponding
method on their elements, and le and ge are the negations of these.
2013-06-07 18:36:16 +10:00
bors
af863cf2a4 auto merge of #6946 : Blei/rust/fix-each-path, r=Aatch 2013-06-07 01:34:32 -07:00
Philipp Brüschweiler
9b3743938d rustc::metadata::decoder: cleanup and slightly speed up each_path 2013-06-07 10:00:48 +02:00