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
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
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
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
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
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
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
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
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
James Miller
de27064d84
Disallow negative counts in repeat expressions
2013-06-07 12:30:44 +12: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