Erick Tryzelaar
f7e1daa8e3
std: get std::path tests to work again
2013-06-14 07:13:32 -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
bors
5bff471dde
auto merge of #7105 : sstewartgallus/rust/removed_unused_imports, r=sanxiyn
...
I was able to remove unused imports, and fix the following warnings
src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)]
src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)]
src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)]
src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)]
I was unable to fix the following unused import warnings. The code
here was weird.
src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)]
src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13 12:08:05 -07:00
Steven Stewart-Gallus
d9d50a5bd4
Remove unused imports
...
I was able to remove unused imports, and fix the following warnings
src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)]
src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)]
src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)]
src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)]
I was unable to fix the following unused import warnings. The code
here was weird.
src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)]
src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13 10:46:17 -07:00
bors
a198aad8f3
auto merge of #7100 : thestinger/rust/hashmap, r=pnkfelix
...
Not much point in leaving these around. They just get in the way when you actually want to log something else.
2013-06-13 03:25:11 -07:00
Daniel Micay
ed7892ac00
hashmap: remove leftover debug!() logging
2013-06-13 03:25:28 -04:00
bors
e6503995ab
auto merge of #7096 : huonw/rust/invalid-null-str, r=thestinger
...
A slice of a 'static str is still 'static, but doesn't necessarily
have the null terminator.
2013-06-12 23:10:15 -07: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
bors
6c45160f19
auto merge of #7027 : sstewartgallus/rust/dynamic_lib, r=graydon
...
I would appreciate if someone could help out with the Windows code on this pull request. I tried to test it using WINE but I couldn't figure out a way to set that up.
2013-06-12 19:07:30 -07:00
Steven Stewart-Gallus
786ea3ffe6
Prototyped a dynamic library facility interface
2013-06-12 17:32:13 -07:00
Huon Wilson
641910dc13
std: make all strings Equiv-alent to each other, generalise Path.push_many to take any type of string.
2013-06-13 10:19:34 +10:00
bors
78cddc83a4
auto merge of #7073 : influenza/rust/iterator-doc-fixes, r=catamorphism
...
This commit fixes two typos and an incorrect description.
2013-06-12 12:13:53 -07:00
bors
4a52ff0786
auto merge of #7072 : thestinger/rust/ptr, r=catamorphism
...
I don't think this will even show up in the documentation right now.... but it should still be correct :).
2013-06-11 22:31:39 -07:00
Huon Wilson
9f0c85acc9
std: fix windows
2013-06-12 13:42:41 +10:00
Huon Wilson
13460de61c
std: fix method renaming.
2013-06-12 13:09:02 +10:00
Huon Wilson
26d7b460a3
std: generalise .trim_chars to use CharEq.
2013-06-12 12:21:05 +10:00
Huon Wilson
073e82fff2
std: create Str trait for DRY. Use it on StrVector.
...
The Str trait collects the various strings types and provides a method
for coercing to a slice, so that functions and impls can be written for
generic types containing strings (e.g. &[~str], &[&str], ...) without
having to write one for each string type (assuming that the impl only
needs a slice).
2013-06-12 12:21:04 +10:00
Huon Wilson
3a1e13c7a0
std: convert str::escape_* to methods.
2013-06-12 12:21:04 +10:00
Huon Wilson
9e60e2e297
std: convert str::replace to a method.
2013-06-12 12:21:04 +10:00
Huon Wilson
12750c8893
std: methodise str::capacity
2013-06-12 12:21:04 +10: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
9fff8c6eba
std: add a test for HashMap::find_equiv.
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
8786bca7e2
std: convert str::repeat to a method.
2013-06-12 12:21:03 +10:00
Huon Wilson
3c23a0a836
std: replace str::append with a method
2013-06-12 12:21:03 +10:00
Huon Wilson
96cd61ad03
std: convert {vec,str}::to_owned to methods.
2013-06-12 12:21:03 +10:00
bors
e06579bc09
auto merge of #7056 : alexcrichton/rust/issue-4727, r=catamorphism
...
Closes #4727
2013-06-11 17:22:46 -07:00
Ron Dahlgren
37489a67e5
Iterator documentation fixes
...
Fixes two typos and one incorrect description.
2013-06-11 16:34:03 -07:00
Daniel Micay
fbae011ad1
fix the docstring for copy_nonoverlapping_memory
2013-06-11 19:06:01 -04:00
Daniel Micay
107e371bf0
fix the ptr::set_memory docstring
2013-06-11 17:48:44 -04:00
Alex Crichton
305f5110a7
Add a finally impl for extern "Rust" fn()
2013-06-11 12:40:40 -07:00
Daniel Micay
bbe3d4a9dc
fix windows build
2013-06-11 15:00:58 -04:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Daniel Micay
4f2f545ac2
add Iterator implementations for Option
2013-06-11 14:05:27 -04:00
bors
d1d855993d
auto merge of #7047 : bblum/rust/bug_triage, r=graydon
...
r? anybody
2013-06-11 09:52:40 -07:00
Huon Wilson
7e6a5940cb
std: convert pow, hypot, atan2, log to take arguments by reference.
2013-06-11 11:36:03 +10:00
Ben Blum
8081aea3b8
Tag a bunch of destructors that need mutable self with FIXME for #4330 . Close #4943 .
2013-06-10 18:18:04 -04:00
Ben Blum
967c7d828a
Replace str::raw::buf_as_slice with c_str_to_static_slice. Close #3843 .
2013-06-10 17:34:28 -04:00
Huon Wilson
e8782eeb63
fix tests, remove some warnings
2013-06-11 02:34:14 +10:00
Huon Wilson
2fa83c0503
std: replace str::is_{alphanumeric,whitespace} with the methods.
2013-06-11 01:07:52 +10:00
Huon Wilson
838191c40b
std: replace str::{starts,ends}_with with the method.
2013-06-11 01:03:24 +10:00
Huon Wilson
248b6e38b5
std: replace str::substr with the method.
2013-06-11 00:52:47 +10:00
Huon Wilson
ebefe425b9
std: remove str::to_chars
2013-06-11 00:49:19 +10:00
Huon Wilson
8c59d920a1
std: basic documentation for the new str methods
2013-06-11 00:08:57 +10:00
Huon Wilson
ccd0ac59e9
std: remove str::{connect,concat}*.
2013-06-10 23:57:03 +10:00
Huon Wilson
5a711ea7c3
clean-up unused import warnings
2013-06-10 23:15:01 +10:00
Huon Wilson
ead4468249
std: fix tests
2013-06-10 23:02:55 +10:00
Huon Wilson
ec5a028ada
std: convert str::char_at* to methods.
2013-06-10 23:02:55 +10:00
Huon Wilson
f632f46614
std: convert str::trim* to methods.
2013-06-10 23:02:55 +10:00