bors
c83bceddbb
auto merge of #7121 : huonw/rust/rand-call, r=pnkfelix
...
r? @pnkfelix
2013-06-14 22:37:13 -07:00
bors
1ba6fa4777
auto merge of #7110 : thestinger/rust/iterator, r=brson
2013-06-14 21:37:27 -07:00
Daniel Micay
d68be89e69
rm MutableIter
...
replaced with mutable implementations of Iterator
2013-06-14 23:15:42 -04:00
Daniel Micay
8111701604
rm ExtendedMutableIter
...
replaced with `xs.mut_iter().enumerate()`
2013-06-14 23:15:42 -04:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
bors
104e6120b1
auto merge of #7116 : thestinger/rust/whitespace, r=luqmana
2013-06-14 19:25:05 -07:00
Brian Anderson
38e05747b5
xfail run-pass/auto-encode.rs
2013-06-14 16:50:53 -07:00
Brian Anderson
7755018074
Revert "std: convert {vec,str}::to_owned to methods."
...
This fixes the strange random crashes in compile-fail tests.
This reverts commit 96cd61ad03 .
Conflicts:
src/librustc/driver/driver.rs
src/libstd/str.rs
src/libsyntax/ext/quote.rs
2013-06-13 19:06:47 -07:00
Huon Wilson
8431e609ea
xfail test on windows, because extern mod doesn't work there
2013-06-14 11:12:06 +10:00
Huon Wilson
f93a974558
syntax: correct the Rand::rand call to select enum variants in #[deriving(Rand)].
...
Previously, this was not a global call, and so when `#[deriving(Rand)]`
was in any module other than the top-level one, it failed (unless there
was a `use std;` in scope).
Also, fix a minor inconsistency between uints and u32s for this piece
of code.
2013-06-14 11:12:06 +10:00
Daniel Micay
ec27644870
automated whitespace fixes
2013-06-13 18:03:08 -04:00
Huon Wilson
abadece3ba
std: remove the invalid NullTerminatedStr instance for &'static str.
...
A slice of a 'static str is still 'static, but doesn't necessarily
have the null terminator.
2013-06-13 14:12:08 +10:00
Michael Sullivan
36e3d64c3e
Fix a lot of the handling of default methods and type parameters. Closes #4099 , #4102 .
2013-06-12 13:50:45 -07:00
Michael Sullivan
a159f856d5
Properly translate calls to default methods in a number of cases. Closes #4350 .
2013-06-12 13:50:15 -07:00
Luqman Aden
47772bcb73
Add tests for duplicate methods on traits/impls.
2013-06-12 02:46:38 -04:00
Huon Wilson
3ac00a9489
std: remove substr & str::count_*, methodise char_len, implement slice_chars.
...
The confusing mixture of byte index and character count meant that every
use of .substr was incorrect; replaced by slice_chars which only uses
character indices. The old behaviour of `.substr(start, n)` can be emulated
via `.slice_from(start).slice_chars(0, n)`.
2013-06-12 12:21:04 +10:00
Huon Wilson
efc71a8bdb
std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume]().
...
The first acts on &str and is not nul-terminated, the last two act on strings
that are always null terminated (&'static str, ~str and @str).
2013-06-12 12:21:04 +10:00
Huon Wilson
ba4a4778cc
std: convert str::{*shift,pop}* to methods.
2013-06-12 12:21:04 +10:00
Huon Wilson
96cd61ad03
std: convert {vec,str}::to_owned to methods.
2013-06-12 12:21:03 +10:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
bors
df5b0c040c
auto merge of #7046 : luqmana/rust/issue-7044, r=sanxiyn
...
Fixes #7044 .
2013-06-10 20:52:32 -07:00
Luqman Aden
693b9ce4e8
Add test for #7044 .
2013-06-10 18:06:56 -04:00
Huon Wilson
e8782eeb63
fix tests, remove some warnings
2013-06-11 02:34:14 +10:00
Huon Wilson
ebefe425b9
std: remove str::to_chars
2013-06-11 00:49:19 +10:00
Huon Wilson
ccd0ac59e9
std: remove str::{connect,concat}*.
2013-06-10 23:57:03 +10:00
Huon Wilson
ec5a028ada
std: convert str::char_at* to methods.
2013-06-10 23:02:55 +10:00
Huon Wilson
1553874149
std: convert str::reserve* to methods, and methodise str::push_*.
2013-06-10 23:02:55 +10:00
Huon Wilson
017450a611
std: replace str::find_str* with a method
2013-06-10 23:02:54 +10:00
Huon Wilson
c32fb53cf9
std: remove str::{len, slice, is_empty} in favour of methods.
2013-06-10 23:02:54 +10:00
Huon Wilson
1e8982bdb2
std: replace str::each_split* with an iterator
2013-06-10 23:02:54 +10:00
Alex Crichton
b6cccb3d81
Track the source of the type_target and value_target separately for ImportResolutions
2013-06-09 21:42:57 -07:00
Luqman Aden
0bf6d9e9ef
Add test for #4228 .
2013-06-09 08:00:52 -04:00
bors
88c318d28c
auto merge of #7023 : thestinger/rust/vec, r=brson
2013-06-08 22:34:10 -07:00
Daniel Micay
de367157b5
remove deprecated vec::{is_empty, len} functions
2013-06-08 23:19:30 -04:00
bors
1f0c05ff74
auto merge of #7018 : bill-myers/rust/fix_7017, r=thestinger
...
Minimally fixes #7017 , we were overwriting the result and thus ignoring attributes before the last.
csearch::get_item_attrs and decoder::get_item_attrs should probably also be changed to each_item_attrs using the for protocol, but that's just a minor performance/style issue.
2013-06-08 19:16:11 -07:00
Bill Myers
54ec7ab057
add test for RcMut being Const and Owned, tests #7017 being fixed
2013-06-09 03:43:58 +02:00
bors
470bf0dfb3
auto merge of #7016 : thestinger/rust/ptr, r=luqmana
2013-06-08 14:31:10 -07:00
bors
4aa77198cb
auto merge of #6992 : Blei/rust/fix-autoderef-ice, r=catamorphism
...
Related to #5062 , but doesn't fix that one.
2013-06-08 12:40:15 -07:00
Daniel Micay
fe3ad0a204
rm some uses of to_mut_unsafe_ptr
2013-06-08 15:02:32 -04: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
Philipp Brüschweiler
c74f39782f
Add test for #5062
2013-06-08 09:34:38 +02:00
Philipp Brüschweiler
c786b68dd3
Add a test that causes an ICE currently
2013-06-08 09:34:25 +02:00
bors
88517f9874
auto merge of #7000 : Blei/rust/fix-6155, r=catamorphism
2013-06-07 22:46:25 -07:00
Tim Chevalier
aac1298122
testsuite: Add test cases that pass
2013-06-07 19:37:29 -07:00
Philipp Brüschweiler
320995198c
Add test for #6155
2013-06-07 22:08:54 +02:00
Huon Wilson
54d914a9a9
std: remove each[i]_mut functions, in favour of iterators.
2013-06-08 03:24:27 +10:00