Commit Graph

18796 Commits

Author SHA1 Message Date
Tim Chevalier
53b8352552 rustpkg: Extract version number from git, as per #5684
For now, the test I added just checks that PkgId::new parses the
version number out of a git repo's tags list, where relevant.
2013-06-08 11:59:03 -07:00
Tim Chevalier
a014088da1 std: Fix search-and-replace typos 2013-06-08 11:59:03 -07:00
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
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
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
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
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
Huon Wilson
6d5beda677 syntax: move expand_generic_deriving to be a method on TraitDef 2013-06-07 17:46:44 +10:00
Huon Wilson
43e52e4bf1 syntax: move functions from deriving/mod to deriving/generic.
These are now only called in generic and can be private. This
includes manually inlining/merging some that are called once.
2013-06-07 17:30:38 +10:00
bors
4abd83b18d auto merge of #6985 : Aatch/rust/fixed-vec-6977, r=thestinger
This fixes #6977. Negative counts don't make sense anyway.
2013-06-06 20:34:32 -07:00
bors
74d9de7abd auto merge of #6979 : thestinger/rust/libc, r=brson
LLVM provides these functions as intrinsics, and will generate calls to
libc when appropriate. They are exposed in the `ptr` module as
`copy_nonoverlapping_memory`, `copy_memory` and `set_memory`.

@graydon: r?
2013-06-06 19:40:32 -07:00
bors
5d2cadbfea auto merge of #6895 : cmr/rust/jemalloc, r=brson 2013-06-06 18:43:37 -07:00
bors
f2e6c01eaf auto merge of #6984 : brson/rust/rtcross, r=brson 2013-06-06 17:49:38 -07:00
James Miller
de27064d84 Disallow negative counts in repeat expressions 2013-06-07 12:30:44 +12:00
Brian Anderson
f702b900d8 mk: Fix _RUST_STAGEX variables under cross compile. Fix incoming 2013-06-06 17:27:22 -07:00
bors
d6b4fde97e auto merge of #6982 : Aatch/rust/better-foreign-error, r=pcwalton
I encountered this. A straight fail is not useful and most people aren't going to happily spelunk in `parser.rs`
2013-06-06 16:52:36 -07:00
James Miller
9c8d0e375e Provide an actual error when expanding macros to foreign items 2013-06-07 11:28:38 +12:00