Commit Graph

464 Commits

Author SHA1 Message Date
Tim Chevalier
cdc8722f95 Add a lint pass to check for while true { ... } loops
And suggest changing them to loop { ... }. Had to fix the few
remaining while true loops (in core::io). Closes #1962.
2012-04-19 18:14:38 -07:00
Tim Chevalier
b0074c5a92 Disallow rebinding / matching against consts in alts
As per Issue #1193. Closes #1193.

I had to rename a few variables ("info" and "epsilon") to avoid
clashing with in-scope constants, which is responsible for all the
changes other than resolve and issue-1193.rs.
2012-04-19 16:21:15 -07:00
Brian Anderson
7a1dc76b0f core: Move set_exit_status from sys to os 2012-04-19 01:26:17 -07:00
Brian Anderson
1cad6322c3 core: Move last_os_error from sys to os 2012-04-19 01:23:00 -07:00
Brian Anderson
01e20dd0b3 core: Improve docs 2012-04-19 01:18:37 -07:00
Graydon Hoare
75cf13ec72 Add str/& component accessor and test. 2012-04-18 17:50:58 -07:00
Niko Matsakis
35a93e61d4 rewrite region resolution so it takes place in typeck 2012-04-16 19:48:00 -07:00
Brian Anderson
903cb0e3a5 core: Factor out uint/u8/16/32/64 mods into uint-template 2012-04-16 12:31:34 -07:00
Brian Anderson
6bb181341b core: Factor out int/i8/16/32/64 mods into int-template 2012-04-16 12:31:34 -07:00
Brian Anderson
7a2d7aa5de core: Add extension methods for is_null, is_not_null 2012-04-15 21:46:29 -07:00
Alexander Stavonin
5b308ec24a export buf_len from ptr 2012-04-15 16:40:47 +09:00
Brian Anderson
eb935b8fcb core: Use tilde-fences in docs
Backtick fences don't work for some reason
2012-04-14 17:17:57 -07:00
Grahame Bowland
6b5731e704 add inf/-inf/NaN parsing to float::from_str
add tests for "inf"/"-inf"/"NaN" conversion
add tests for "-0." -> -0., "0." -> 0.
2012-04-15 02:21:57 +08:00
Graydon Hoare
d85e48840d Trivial change to force a doc rebuild. 2012-04-13 19:51:04 -07:00
Niko Matsakis
dfc548ddda add option exec-env to set env variables during test execution 2012-04-13 12:41:37 -07:00
Niko Matsakis
c2fe288900 change to use && mode (can't move from upvar)
relevant to #1965
2012-04-13 10:41:46 -07:00
Tim Chevalier
16eb06c246 Annotate FIXMEs in core::vec 2012-04-12 23:38:53 -07:00
Tim Chevalier
93a1f5e85f Annotate FIXMEs in core::task 2012-04-12 23:38:25 -07:00
Tim Chevalier
a1b305c8e5 Remove or annotate FIXMEs in core::str
Trimmed exports in core::str::unsafe. Annotated other FIXMEs.

Also moved the test for str::unsafe::from_buf_len inside str_unsafe
since it's no longer exported. If it's not good to do that, let me
know.
2012-04-12 23:38:02 -07:00
Tim Chevalier
ea0063788b Add a run-fail test for result::get, get rid of a FIXME. Also some random other tests, mostly xfailed. 2012-04-12 20:24:07 -07:00
Niko Matsakis
e712ad8f73 rewrite lookup_method(), lookup_method_inner(), and lookup_method_inner_() 2012-04-11 17:21:53 -07:00
Graydon Hoare
9fda1578a2 Add ptr::position and ptr::buf_len, close #2183. 2012-04-11 15:46:51 -07:00
Brian Anderson
10236f8cd4 core: Make str::as_bytes handle failure. Closes #2156 2012-04-09 18:57:21 -07:00
Brian Anderson
9e1e42d750 core: Add tests for the string repr of infinity 2012-04-08 14:16:55 -07:00
Brian Anderson
56f09791fe Merge pull request #2164 from grahame/floatinfstr
write out "inf"/"-inf" in float::to_str_common
2012-04-08 13:55:22 -07:00
Grahame Bowland
2bee6132f9 write out "inf"/"-inf" in float::to_str_common 2012-04-09 01:33:36 +08:00
Brian Anderson
01dc4a8b26 core: Add priv::weaken_task 2012-04-07 19:56:41 -07:00
Jesse Ruderman
139420f664 Correctly filter . and .. from the file list. 2012-04-06 19:07:22 -07:00
Brian Anderson
63942c969d core: Add priv::chan_from_global_ptr
This allows singleton, globally accessible tasks to be created
2012-04-06 17:44:26 -07:00
Tim Chevalier
9d274ec5f2 Re-rename option functions
get_with_default (nee from_maybe) => get_default
with_option (nee maybe) => map_default
with_option_do (nee may) => iter

As per discussion of 21be1379d5
2012-04-06 12:20:13 -07:00
Marijn Haverbeke
fc202ca034 Remove support for old-style for
Closes #1619
2012-04-06 20:38:23 +02:00
Marijn Haverbeke
c902eafa14 Convert old-style for loops to new-style
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.

(This hack will go away soon.)

Issue #1619
2012-04-06 20:38:23 +02:00
Brian Anderson
ce8023b9ac Merge pull request #2139 from Jonanin/add_str_len
Add len to str extensions
2012-04-05 23:49:55 -07:00
Jon Morton
d621ada003 Add len to str extensions 2012-04-06 01:12:49 -05:00
Brian Anderson
d13c0c77a2 Explicitly use version 0.2 of crates 2012-04-05 20:29:42 -07:00
Niko Matsakis
b91c9f803d simplify typing rule for vector addition: use mutability of LHS 2012-04-05 15:18:26 -07:00
Tim Chevalier
98b07ddc82 Rename task::task_builder to task::builder
Closes #2120.
2012-04-05 14:09:32 -07:00
Graydon Hoare
2577e3eafc Tidy up predicate names in libcore. Should close #1431. 2012-04-04 18:08:55 -07:00
Erick Tryzelaar
72444636d3 std: Flesh out result::extensions. 2012-04-03 22:43:09 -07:00
Erick Tryzelaar
2ad20df40b std: Rename result::methods to result::extensions 2012-04-03 22:43:09 -07:00
Brian Anderson
12d3d4f125 core: Export is_null, is_not_null 2012-04-03 22:32:55 -07:00
Brian Anderson
3b8097dacc core: Add ptr::is_null/is_not_null 2012-04-03 21:56:16 -07:00
Brian Anderson
e325146eb4 Merge remote-tracking branch 'brson/mainthread'
Conflicts:
	src/rt/rust_kernel.cpp
	src/rt/rust_scheduler.cpp
	src/rt/rust_scheduler.h
2012-04-03 20:30:01 -07:00
Brian Anderson
bef72447e7 core: Add a scheduler mode, osmain, to spawn onto the main scheduler 2012-04-03 14:28:30 -07:00
Tim Chevalier
e9ff495942 Merge branch 'issue-1983' of https://github.com/thomaslee/rust into issue-2090
This adds a new os::copy_file function, contributed by Thomas Lee.
I added test cases.
2012-04-02 21:47:20 -07:00
Tim Chevalier
21be1379d5 Rename some core::option functions
from_maybe => get_with_default
maybe => with_option
may => with_option_do

I know these names are kind of ridiculous, but it's the best I could think of.
Feel free to bikeshed. Closes #2081
2012-04-02 16:12:49 -07:00
Brian Anderson
efe4c6af23 core: Use the or binop instead of the double-star binop 2012-04-01 15:05:29 -07:00
Jonathan Sternberg
3a0477c398 Fixing issue 1919. list_dir is the more general version that returns a vector with the contents of the directory. list_dir_path contains the old behavior (as a convenience function). 2012-04-01 11:39:17 -04:00
Brian Anderson
6e8cf935db core: Add each, each_char to str::extensions 2012-03-29 22:30:15 -07:00
Brian Anderson
8641c95221 core: Add str::each_char 2012-03-29 22:28:26 -07:00