Commit graph

18779 commits

Author SHA1 Message Date
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
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
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
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
John Clements
eff49fc48b implement fold traversing macros 2013-06-06 14:21:07 -07:00
John Clements
2d59ebadb9 add test cases for fold traversing macros 2013-06-06 14:21:07 -07:00
bors
533425e242 auto merge of #6053 : nikomatsakis/rust/fixme-2699, r=thestinger
r? @jld or @graydon

The calculation looks right to me, but perhaps one of you two can double check.  You two seem like you are doing the most recent work in this sort of area.
2013-06-06 13:52:41 -07:00
Marvin Löbel
cac4891154 Fixups 2013-06-06 22:40:35 +02:00
Marvin Löbel
070015468d Removed IteratorUtil::to_vec and iter::to_vec 2013-06-06 22:11:48 +02:00
Marvin Löbel
857d433b9a Added IteratorUtil::collect 2013-06-06 22:11:48 +02:00
Marvin Löbel
af2086a2f1 Added iter::FromIter 2013-06-06 22:11:47 +02:00
bors
a51fae097f auto merge of #6937 : msullivan/rust/no-warnings, r=bstrie 2013-06-06 12:58:41 -07:00
Daniel Micay
8bcefef2f2 libc: omit memcpy, memmove and memset
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`.
2013-06-06 15:18:45 -04:00
Michael Sullivan
8bbf83b62a Clean up a handful of build warnings. 2013-06-06 12:14:41 -07:00
bors
0e96369224 auto merge of #6968 : huonw/rust/takeskip-iter, r=thestinger
@thestinger r?

Adding the dummy parameter stops the inference from having to work so hard.
2013-06-06 10:07:41 -07:00
bors
021e6d38f0 auto merge of #6975 : artagnon/rust/tuple-tostr, r=bstrie
[1/2] fixes a couple of comments.
[2/2] uses fmt! instead of hand-concatenating strings in a couple of places.

No functional changes.
2013-06-06 09:13:44 -07:00
Ramkumar Ramachandra
01c4f11cf8 libstd: use fmt! in to_str impl for (one|two)-tuple
The three-tuple uses fmt!, and there's no reason to hand-concatenate
strings.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-06 20:50:29 +05:30
Ramkumar Ramachandra
ab10b1ed29 libstd: fix comment in to_str impl of tuple
There is a pointer to #4760, which is a closed issue.  The real issue is
the more general problem described in #4653.  Correct the comment.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-06 20:50:29 +05:30
bors
8450dc8f5e auto merge of #6972 : artagnon/rust/bad-for-loop, r=bstrie
I noticed this while reading the tutorial.

[1/2] adds tests to guard against regressions.
[2/2] corrects the tutorial.

Please let me know if you have a standard place to put tests: they seem to be all over the place currently.
2013-06-06 07:46:47 -07:00