Commit Graph

18844 Commits

Author SHA1 Message Date
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
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
bors
6a09b6f0c3 auto merge of #6981 : jbclements/rust/fold-traverses-macros, r=catamorphism
Fixes bug #2888 . Includes test cases

r? @catamorphism
2013-06-06 15:43:35 -07:00
bors
145279709d auto merge of #6980 : Kimundi/rust/iterator-collect3, r=thestinger 2013-06-06 14:46:41 -07:00