Commit Graph

1886 Commits

Author SHA1 Message Date
Patrick Walton
ca71c6ec5b librustc: Make all external functions unsafe. r=tjc 2013-01-10 21:24:08 -08:00
Tim Chevalier
90a0dd4008 core: Change XXXs into proper FIXMEs with issue numbers 2013-01-10 15:35:41 -08:00
Tim Chevalier
603e13cc02 Use deriving_eq for Task 2013-01-10 15:35:41 -08:00
Niko Matsakis
737e115646 mode: reset mode on entry to fn body.
This is an interim fix to address the "Beware!" unsoundness.  I have a
more comprehensive rewrite of mode.rs in the pipeline.

r=pcwalton
2013-01-10 13:17:25 -08:00
William Ting
5cfde77bca Rename memcpy, memmove, memset to prevent any confusion with the C equivalents.
Closes #4203.
2013-01-10 01:24:41 -06:00
Patrick Walton
349e772bc5 libcore: Fix missing off_t import on Mac. rs=bustage 2013-01-09 21:15:27 -08:00
Patrick Walton
bea3a7a14c libcore: Some more fixes to Windows libc stuff. rs=bustage 2013-01-09 21:14:28 -08:00
Patrick Walton
bd737d41a1 libcore: Fix Windows resolve errors. rs=bustage 2013-01-09 20:39:37 -08:00
Patrick Walton
1cc22a35df libcore: Fix import in libc. rs=bustage 2013-01-09 19:25:33 -08:00
Graydon Hoare
6644da5805 core: fix crashing vec methods due to non-working moved self. 2013-01-09 17:21:21 -08:00
Niko Matsakis
2b92962aa2 A collection of refactorings that I found it hard/tiresome to divide:
- Make `extern fn()` assignable to any closure type, rather than
  a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns.  This is both
  eliminating use of deprecated features and more forwards compatible
  with fn reform.

r=pcwalton
2013-01-09 14:59:07 -08:00
Graydon Hoare
11a307294a rustc: yet more arch-specific fallout from 2db3abd 2013-01-09 14:11:55 -08:00
Graydon Hoare
d0fa688f56 rustc: more arch-specific fallout from 2db3abd 2013-01-09 10:43:16 -08:00
Graydon Hoare
8436a4460e core: try to fix arch- and platform-specific fallout from 2db3abd 2013-01-09 09:26:59 -08:00
Graydon Hoare
9b8c04e236 core: ignore recent should_fail tests on windows 2013-01-09 09:26:59 -08:00
Erick Tryzelaar
c766924f44 core: add vec.filter that moves elems out of the vector 2013-01-09 08:55:37 -08:00
Erick Tryzelaar
2891a49f0d core: rename vec.filter to vec.filtered 2013-01-09 08:55:37 -08:00
Erick Tryzelaar
9a7e261562 core: add vec.partition and vec.partitioned 2013-01-09 08:55:37 -08:00
Erick Tryzelaar
c55787d009 core: add a vec.consume method 2013-01-09 08:55:37 -08:00
Erick Tryzelaar
8f9a507973 core: add self to all vec methods 2013-01-09 08:55:37 -08:00
Erick Tryzelaar
dc7183ed0e core: rename MutableVector to OwnedVector 2013-01-09 08:55:37 -08:00
Erick Tryzelaar
d1b7d44b8c core: inline all vec methods and add whitespace 2013-01-09 08:55:37 -08:00
Graydon Hoare
f6dd2d219e core: fix libc linux fallout from 2db3abddcd 2013-01-09 08:04:18 -08:00
Patrick Walton
2db3abddcd librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37 Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
This reverts commit a8d37af247.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247 librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 19:27:57 -08:00
Brian Anderson
3b71d14442 Inject std when --test. #1127, #3241 2013-01-08 14:58:39 -08:00
ILyoan
2d3c22ae59 arrange core::os::consts 2013-01-08 14:35:28 -08:00
asdf
dd73dd0e37 removing checks from vec::bytes::memcpy and memmove as are duplicated from raw:: 2013-01-08 13:25:23 -08:00
asdf
4096c9f25f adding bound checks for raw::memcpy and memmove 2013-01-08 13:25:23 -08:00
Andrew Paseltiner
1d4c5d90bd fmt: add unit tests 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
73649f36e8 fmt: derive Eq for all types 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
0429493363 fmt: fix formatting and style 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
428abb3d97 fmt: simplify parse_fmt_string 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
9e5a4166d5 fmt: simplify parse_conversion 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
af298deff7 fmt: simplify parse_parameter 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
4550cb0562 fmt: simplify parse_precision 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
9c383deaa6 fmt: simplify parse_count 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
f4bc9e6d57 fmt: simplify parse_flags 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
51b141e3e4 fmt: simplify parse_type 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
0a17ab2a9c fmt: replace parse_* structural records with struct Parsed<T> 2013-01-07 17:22:01 -05:00
Andrew Paseltiner
1a2a8975bc fmt: replace Conv record with struct Conv 2013-01-07 17:22:01 -05:00
Patrick Walton
9f387926fc librustc: Fold rt items into lang items. Shaves another 10% or so off hello world compile time. 2013-01-07 12:21:34 -08:00
Tim Chevalier
89acd1f57f Rename option::get_default => get_or_default, get_zero => get_or_zero 2013-01-04 16:01:26 -08:00
Tim Chevalier
4d8cc3f003 Make either::{partition, flip, to_result} take their arguments by-value
Addresses an XXX

r=pcwalton
2013-01-04 15:39:31 -08:00
Graydon Hoare
62f6f46072 core: fix windows breakage, r=burningtree. 2013-01-04 15:38:56 -08:00
Tim Chevalier
1f1e7e9616 Add option::get_zero
r=brson

Closes #3797
2013-01-04 00:46:55 -08:00
Andrew Paseltiner
a933cdfbf1 clean up condition module:
* use Drop trait in Guard
* fix formatting
* remove bare function in Condition.raise_default
* use moved types instead of borrowed pointers in Condition.{raise,trap}
* import common functions
2013-01-03 15:53:06 -08:00
Erick Tryzelaar
392708e3b1 core: convert an XXX into a FIXME. 2013-01-02 10:40:47 -05:00
Tim Taubert
4b1d2dc884 reset LinearMap.size when expanding buckets 2012-12-30 19:38:42 +01:00
Tim Chevalier
cef153947d Long lines 2012-12-28 13:35:15 -08:00
Tim Chevalier
7af1080f5e Merge pull request #4308 from steveklabnik/patch-1
Improve documentation for each.
2012-12-28 11:52:16 -08:00
Steve Klabnik
5ec3aba8cc Improve documentation for each.
Add description of arguments, and an example.
2012-12-28 01:12:28 -05:00
Patrick Walton
e26ca35b08 librustc: Fix the test runner, the condition system, and core test. rs=bustage 2012-12-27 17:53:04 -08:00
Patrick Walton
57c599914a librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon 2012-12-27 10:02:54 -08:00
Patrick Walton
6b659392ea libcore: Add symlink(2) to libc. rs=trivial 2012-12-27 10:02:51 -08:00
Tim Chevalier
6dbb025267 Fix wayward search and replace; unbreak build 2012-12-24 18:29:02 -08:00
gareth
fddc849d75 Convert core::io to use explicit self (for issue #4118 and issue #2004) 2012-12-24 18:29:02 -08:00
Chris Peterson
c1e58aad70 core: Mark some functions as pure 2012-12-24 18:29:02 -08:00
Graydon Hoare
329316ce15 bump 0.5 => 0.6, redirect some URLs in docs. 2012-12-24 18:29:01 -08:00
Erick Tryzelaar
50902bb302 Fix Option::unwrap_err. 2012-12-24 18:29:01 -08:00
Tim Chevalier
46122bf333 Fix wayward search and replace; unbreak build 2012-12-24 12:37:45 -08:00
Tim Chevalier
66dc4898c7 Merge pull request #4278 from cpeterso/incoming-pure-functions
Mark some more core and std functions as pure
2012-12-24 11:33:22 -08:00
gareth
feff3a9c6c Convert core::io to use explicit self (for issue #4118 and issue #2004) 2012-12-24 18:52:53 +00:00
Chris Peterson
6d8621ae7f core: Mark some functions as pure 2012-12-23 14:37:44 -08:00
Tim Chevalier
197a1f9cfe Merge pull request #4243 from erickt/incoming
Fix a bug in Result::unwrap_err (and minor cleanup)
2012-12-23 13:49:32 -08:00
Graydon Hoare
dbd36111fe bump 0.5 => 0.6, redirect some URLs in docs. 2012-12-21 15:35:49 -08:00
Erick Tryzelaar
5e94407a94 Fix Option::unwrap_err. 2012-12-20 21:16:02 -08:00
Erick Tryzelaar
e8102e73a9 core: Add a Zero and One trait to num
I believe these are the last traits we need in order
to start grouping our numerical types into mathematical
groups and rings.
2012-12-20 07:15:04 -08:00
Erick Tryzelaar
2ad41b881c core: add unwrap methods to dvec, either, and mutable 2012-12-18 20:54:13 -08:00
Erick Tryzelaar
a0ef334179 core: use movable self to clean up option/result. 2012-12-18 20:54:13 -08:00
Erick Tryzelaar
938058b004 Fix vec::flat_map_to_vec method 2012-12-18 20:48:51 -08:00
Graydon Hoare
8e28f23c60 core: add macro_rules! for "condition! { c: in -> out; }". 2012-12-18 17:22:27 -08:00
Graydon Hoare
6d4fbd4f9e core: fix remaining repr bugs, r=burningtree. 2012-12-18 14:35:20 -08:00
Erick Tryzelaar
85bb1fc2c4 Change iter::find's closure to take a ref 2012-12-17 22:01:38 -08:00
Erick Tryzelaar
88962eeed8 core: Add &self to core::iter methods 2012-12-17 22:01:38 -08:00
Graydon Hoare
7ab66a46b7 core: remove old repr system, enable newer one. Close #3109. 2012-12-17 16:55:40 -08:00
Brian Anderson
5bf7ba0773 Register snapshots 2012-12-17 16:44:27 -08:00
Brian Anderson
68998724c6 Revert "Register snapshots"
This reverts commit d6d12d90ff.
2012-12-17 16:26:44 -08:00
Brian Anderson
d6d12d90ff Register snapshots 2012-12-17 16:22:21 -08:00
Brian Anderson
8311c94db4 Merge pull request #4200 from ttaubert/issue-2649-rewrite-to_str_bytes
rewrite uint::to_str_bytes to avoid raw pointers
2012-12-17 12:43:28 -08:00
Tim Taubert
2f3d4f6181 rewrite uint::to_str_bytes to avoid raw pointers 2012-12-15 18:45:40 +01:00
Brian Anderson
309cdfd835 Remove more uses of 'move' from core::vec 2012-12-14 17:12:41 -08:00
Brian Anderson
2c21f348a4 Rewrite core::vec::shift to not allocate 2012-12-14 17:09:44 -08:00
Brian Anderson
e6d1b02359 Rename core::comm to core::oldcomm 2012-12-14 14:59:32 -08:00
Brian Anderson
80ef7243ea Remove spawn_listener, spawn_conversation
These are not needed in a pipe-based Rustiverse
2012-12-14 14:59:32 -08:00
Brian Anderson
01a6524d00 Stop using spawn_conversation in chan_from_global_ptr 2012-12-14 14:59:32 -08:00
Brian Anderson
ebc19034ee Fix broken tests 2012-12-14 14:26:57 -08:00
Brian Anderson
e7ef82dd70 Change some uses of static methods to use the trait path 2012-12-13 16:15:08 -08:00
Brian Anderson
d809e89c26 Replace some Eq impls with deriving_eq 2012-12-13 16:14:28 -08:00
Brian Anderson
ed4fac01b5 Rename Send trait to Owned 2012-12-13 15:52:50 -08:00
Brian Anderson
a277081ee4 Rename Owned trait to Durable 2012-12-13 15:52:50 -08:00
Patrick Walton
4c2e4c37ce librustc: Make use statements crate-relative by default. r=brson 2012-12-13 13:05:22 -08:00
Brian Anderson
0d59e86d80 core: Remove some uses of 'move' 2012-12-12 19:15:18 -08:00
Brian Anderson
948754b572 Fix the test for transmute 2012-12-12 18:41:30 -08:00
Tim Chevalier
38bd694df1 Reverse the order of the results of pipes::stream
As per #3637.
2012-12-11 19:23:28 -08:00
Erick Tryzelaar
3657d5606d core: add Eq impl to LinearMap. 2012-12-11 13:57:57 -08:00
Brian Anderson
3fcdb7d6a7 Adjust the die macro to only accept ~str and to work in statement position 2012-12-10 18:16:22 -08:00
Graydon Hoare
12c32e944d Add license boilerplate to more files. 2012-12-10 17:32:58 -08:00
Brian Anderson
04d9ea6f32 core: Fix capitalization in docs 2012-12-10 15:42:36 -08:00
Brian Anderson
1b481017ac Minor cleanups to pipes and serialization 2012-12-10 15:42:34 -08:00
Brian Anderson
9723d3ac2f Remove transitional code 2012-12-09 17:59:21 -08:00
Patrick Walton
e9e3d02b7d libcore: Fix Windows-only pattern in run.rs. rs=bustage 2012-12-07 21:52:39 -08:00
Brian Anderson
4ab1c8805a Convert Num to explicit self 2012-12-05 19:23:13 -08:00
Patrick Walton
7a065f2434 libcore: Fix some more coretest bustage. rs=bustage 2012-12-05 15:30:00 -08:00
Patrick Walton
1282fc8074 librustc: Hook borrow check loan checking up to the moves-based-on-type infrastructure. rs=helps-unbreak-the-build 2012-12-05 15:07:48 -08:00
Brian Anderson
0b5877afb8 Merge remote-tracking branch 'rntz/tuple-iterbytes'
Conflicts:
	src/libcore/to_bytes.rs
2012-12-05 11:58:35 -08:00
Patrick Walton
3440482d8d test: Fix a bunch of test cases. rs=burning 2012-12-05 11:40:47 -08:00
Patrick Walton
33c1e47c1b librustc: Implement moves based on type. r=nmatsakis 2012-12-04 15:38:04 -08:00
Patrick Walton
d1ebdbeb6c librustc: Implement explicit self for Add and Index; add a hack in the borrow checker to support this. r=nmatsakis 2012-12-04 14:51:31 -08:00
Graydon Hoare
94be145169 core: rename box to managed. Close #4079. 2012-12-03 17:45:19 -08:00
Graydon Hoare
2a5713ed5c core: rename unit to nil. Close #4080. 2012-12-03 17:28:19 -08:00
Graydon Hoare
00c856c0b1 Update license, add license boilerplate to most files. Remainder will follow. 2012-12-03 17:12:14 -08:00
Michael Arntzenius
5b6c1a2950 call out to iter_bytes_{2,3} in IterBytes instances for pairs, triples
This means we will exit early if requested based on the return value of the
callback we're given.
2012-12-02 20:01:28 -05:00
Michael Arntzenius
ef2c404e01 libcore/to_bytes.rs: fix IterBytes instances for pairs, triples to not cause ICE when used 2012-12-02 17:48:32 -05:00
Patrick Walton
f34833abfc librustc: Make a.b() always a method call. r=nmatsakis 2012-11-30 20:41:46 -08:00
Tim Chevalier
bde2dcc8d5 Merge pull request #4085 from andrew-d/andrew-fix-typo
Fix small typo in kinds documentation
2012-11-30 12:48:28 -08:00
Andrew Dunham
e19d8f7ae5 Fix small typo in kinds documentation 2012-11-30 15:39:44 -05:00
Graydon Hoare
d783f4d7bb libs: Remove transitionary material on iter_bytes, add workcache to build. 2012-11-30 10:33:16 -08:00
Brian Anderson
38ba2c4941 core: Add docs about kind traits 2012-11-30 01:52:26 -08:00
Brian Anderson
b52a4b412e core: Make core.rc more readable. Cleanup 2012-11-30 01:32:53 -08:00
Brian Anderson
3ed9fbd63c impls of traits cannot define methods on the anonymous trait 2012-11-29 22:07:49 -08:00
Brian Anderson
28ecef7bf5 core: Add impls of Eq and Ord for f32, f64 2012-11-29 18:10:11 -08:00
Patrick Walton
a0617eae68 librustc: Eliminate most expressions of the form a.b() that are not method calls. rs=refactoring 2012-11-29 17:51:56 -08:00
Paul Stansifer
9814e58815 No longer parse the delimiters of the RHS of a macro as part of the expansion. 2012-11-29 12:09:10 -08:00
Patrick Walton
9e1c9be16f librustc: Make the Drop trait use explicit self 2012-11-29 11:06:15 -08:00
Brian Anderson
5a282ec26f core: Convert some records to structs 2012-11-28 21:50:09 -08:00
Brian Anderson
65bd40e300 Remove uses of #[merge] 2012-11-28 17:09:26 -08:00
Brian Anderson
9b95d51131 core: Remove old template files 2012-11-28 15:26:55 -08:00
Brian Anderson
fc06114ddf Merge remote-tracking branch 'brson/companion' into incoming
Conflicts:
	src/compiletest/compiletest.rs
	src/libcargo/cargo.rs
	src/libcore/core.rs
	src/librustc/rustc.rs
	src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Brian Anderson
8179e268ef Register snapshots 2012-11-28 12:33:00 -08:00
Patrick Walton
669fbddc44 librustc: Add explicit self to IterBytes. r=nmatsakis 2012-11-28 11:36:04 -08:00
Patrick Walton
07f4031bb4 libsyntax: Implement a macro die! to replace the fail expression. r=brson 2012-11-28 11:28:56 -08:00
Michael Arntzenius
d2d6d955f4 libcore/to_bytes.rs: add IterBytes impls for pairs and triples. r=pcwalton 2012-11-28 11:27:05 -08:00
Michael Arntzenius
d718bc292d libcore/to_bytes.rs: add IterBytes impls for pairs and triples 2012-11-28 12:35:08 -05:00
Brian Anderson
b21e9d52de core: Add Clone trait 2012-11-27 11:08:19 -08:00
Patrick Walton
7bc29c62d0 libcore: Add explicit self to all overloaded operators but Add and Index. r=brson 2012-11-26 19:35:52 -08:00
Brian Anderson
be6613e048 Remove the crate language 2012-11-26 18:13:54 -08:00
Brian Anderson
917ee7e5b1 Ignore two failure tests on windows 2012-11-26 14:48:48 -08:00
Gareth Daniel Smith
689f6ce5d0 Add insert and remove methods to vecs - as proposed in issue #4028. 2012-11-26 14:34:50 -08:00
Brian Anderson
f648de74a5 Ignore a should_fail test on windows 2012-11-25 13:52:07 -08:00
Tim Chevalier
455d73cb86 [libs] Remove unread_byte method from core::io::Reader
Method isn't used. See discussion on #2738 and #4031

Closes #2738
2012-11-24 14:39:21 -08:00
Tim Chevalier
55ca36196d Merge pull request #4026 from eholk/float-perf
Inline numeric operations for floats.
2012-11-24 09:01:23 -08:00
Gareth Daniel Smith
f841d43f54 Fix a bug where read(buf, len) would fail if buf was big enough and succeed if it was too small ... which is the opposite of correct. 2012-11-24 15:19:51 +00:00
Eric Holk
c961d214d9 Inline numeric operations for floats. 2012-11-23 13:27:02 -08:00
Graydon Hoare
0c8a009dc9 libcore: fix build breakage on win32 stat. 2012-11-21 15:35:47 -08:00
Erick Tryzelaar
a27f5239bd libcore: Add stat methods to paths
Should we return the posix types, or should we just use i64s?
Should we expose platform specific stat fields?
2012-11-20 16:39:31 -08:00
Erick Tryzelaar
20c11ca757 libcore: add stat functions to libc 2012-11-20 16:39:31 -08:00
Erick Tryzelaar
28745ce7c8 libcore: Clean up the path tests 2012-11-20 16:39:30 -08:00
Erick Tryzelaar
ab5d84258e Add PosixPath and WindowsPath constructor fns 2012-11-20 16:39:30 -08:00
Erick Tryzelaar
e70b481803 libcore: minor os.rs cleanup 2012-11-20 16:39:30 -08:00
Erick Tryzelaar
079c768df5 libcore: Fix a typo 2012-11-20 16:39:30 -08:00
Erick Tryzelaar
9539724e8b Remove parentheses from closure argument types 2012-11-20 16:39:30 -08:00
Graydon Hoare
34b7db3bbc Merge pull request #4001 from jesse99/features/docs
Features/docs
2012-11-19 16:10:31 -08:00
Patrick Walton
318e534895 rustc: Implement explicit self for Eq and Ord. r=graydon 2012-11-19 15:33:11 -08:00
Jesse Jones
e5c9a8a479 Fixed lint problems 2012-11-18 17:05:04 -08:00
Jesse Jones
0fd9c9d054 Made from_str pure 2012-11-18 13:25:27 -08:00
Jesse Jones
361aea94f2 Fixing warnings for long and blank lines 2012-11-18 13:25:26 -08:00
Jesse Jones
6d99a2f8a9 Made more stuff pure.
escape functions in char, io.with_str_reader, base64 and md5sum, cell.empty_cell
and is_empty.
2012-11-18 13:25:26 -08:00
Jesse Jones
c5ab47e7ba Made Result.get, get_ref, is_ok, is_err, and iter methods pure.
Note that the function versions were already pure.
2012-11-18 13:25:25 -08:00
Jesse Jones
68c852ad3a Made Map.contains_key, contains_key_ref, and get pure. 2012-11-18 13:25:24 -08:00
Jesse Jones
d107e586ea Documented fmt! expression syntax.
Closes #3280
2012-11-18 11:00:39 -08:00
Patrick Walton
64305174c9 librustc: Fix cross-crate reexports. rs=blocking-servo 2012-11-15 17:15:02 -08:00
Tim Chevalier
f67904ca40 Un-ignore test_from_str and test_parse_buf
Closes #2609
2012-11-15 16:49:57 -08:00
Graydon Hoare
59a034a63f rt: bump log levels up by one, fix tautological-compare error (and permit turning off logging entirely). 2012-11-15 12:03:54 -08:00
Brian Anderson
1ead8aa0b5 Merge pull request #3954 from burg/result-chain
Fix Result::chain, Result::chain_err to not require Copy bounds.
2012-11-12 18:05:29 -08:00
Brian J. Burg
37ed7fcaae Fix Result::chain, Result::chain_err to not require Copy bounds. 2012-11-12 17:53:08 -08:00
Brian Anderson
c78020ef4f Whitespace 2012-11-08 17:11:44 -08:00
Brian J. Burg
a5718ba377 Change option::expect to not require a Copy bound, and move instead. 2012-11-08 16:25:22 -08:00
Patrick Walton
0fc952372a rustc: Support irrefutable patterns in function arguments. r=nmatsakis 2012-11-07 19:29:30 -08:00
Patrick Walton
2904095570 rustc: Implement the Drop trait. r=brson 2012-11-07 12:34:32 -08:00
Zack Corr
a54d046174 Implement Ptr trait for mutable unsafe pointers. Closes #3926. 2012-11-07 16:24:29 +10:00
Graydon Hoare
92e3a8c17e rustc: reuse const vals, translate fn paths as consts. Close #2530. 2012-11-06 17:13:52 -08:00
Brian Anderson
45a908cad0 Merge pull request #3916 from Dretch/iofix
More methods/docs/tests for core::io
2012-11-04 12:51:34 -08:00
Gareth Daniel Smith
fd6f62f9c7 Add more doc-comments for Reader, ReaderUtil, Writer and WriterUtil (loosely associated with issue #2004). 2012-11-04 18:11:37 +00:00
Gareth Daniel Smith
0aba903de7 Add size-specific int reading methods to ReaderUtil to match the existing int writing methods in WriterUtil (for issue #2004). 2012-11-04 10:14:49 +00:00
Tim Chevalier
563aa0bf6c Remove the last use of rustrt::rust_compare_and_swap_ptr
Closes #3527

r=brson
2012-11-03 14:11:30 -07:00
Tim Chevalier
a006608276 Remove stage0 stuff that was awaiting snapshot
and re-register snapshots

Just removing unneeded code, no review
2012-11-03 14:04:32 -07:00
Gareth Daniel Smith
a42d2d408a Fix a bug where .write([]) would always fail. 2012-11-03 18:48:02 +00:00
Tim Chevalier
4876eb708c Fix #1996 (pending snapshot)
Change int to uint in some extfmt code. Remove the #[cfg(stage0)] code
after a snapshot.
2012-11-02 12:01:38 -07:00
Patrick Walton
ad02510258 libcore: Implement a memory-safe "each_val" for data in aliasable, mutable locations 2012-11-02 10:17:32 -07:00
Brian Anderson
b62844e755 core: peek returns false for terminated pipes. Closes #3905 2012-11-02 00:57:44 -07:00
Graydon Hoare
b7872fa13e core: fix breakage from recent merge. 2012-10-30 10:33:19 -07:00
Mahmut Bulut
f938714be1 Remove trait of TimesIx 2012-10-30 15:19:14 +02:00
Mahmut Bulut
ac92cc8898 Removing iter::TimesIx 2012-10-28 22:36:01 +02:00
Tim Chevalier
47baebc68c Remove un-needed comparisons, suppress warnings 2012-10-27 17:07:45 -07:00
Tim Chevalier
af842bf76c Rename core::uniq to core::owned
No review.
Closes #3841
2012-10-25 14:48:28 -07:00
Patrick Walton
ce23a99925 libcore: Make a few more dvec functions inline. Improves profile of Servo. rs=me 2012-10-25 10:23:37 -07:00
Brian Anderson
b2d5acd6bc Merge remote-tracking branch 'brson/futures' 2012-10-24 20:29:01 -07:00
Niko Matsakis
1a3a70760b Implement proper subtyping for region fn types (part of #2263) 2012-10-24 18:56:31 -07:00
Brian Anderson
d29962f0eb Move futures to std 2012-10-23 14:46:49 -07:00
Brian Anderson
f500f3f1fb core: Remove remaining use of Future 2012-10-23 14:21:15 -07:00
Brian Anderson
3e4b2bd2b2 core: Use PortOne instead of Future in future_result 2012-10-23 14:21:15 -07:00
Brian Anderson
f6d2a71436 core: Remove the unused Notification enum 2012-10-23 14:21:15 -07:00
Brian Anderson
b6bde885dc core: Use less code for option dancing that notification channel 2012-10-23 14:21:15 -07:00
Brian Anderson
84c8549622 core: Replace future_pipe with pipe::oneshot 2012-10-23 14:21:15 -07:00
Brian Anderson
50f9925fab core: Give future_pipe the same definition as pipes::oneshot 2012-10-23 14:21:15 -07:00
Brian Anderson
8d932160d9 rt: Remove box annihilator 2012-10-23 12:14:46 -07:00
Tim Chevalier
11e92f37c1 Remove uses of binary move - <- - from tests and libraries 2012-10-23 12:10:03 -07:00
Brian Anderson
ce1466fbe5 Tidy 2012-10-22 21:46:30 -07:00
Brian Anderson
b2af873b76 Merge remote-tracking branch 'luqmana/incoming' 2012-10-22 21:44:53 -07:00
Luqman Aden
ed447a7447 Fix compare_and_swap to not break tests. 2012-10-23 00:03:56 -04:00
Brian Anderson
f7c6f867b3 core: Add Result.get_ref method 2012-10-22 18:31:22 -07:00
Graydon Hoare
a605416bb4 core: add condition.raise_default. 2012-10-22 18:22:21 -07:00
Graydon Hoare
705afcd844 core: settle on the trap/in condition convention for now. Implement proper re-raising. 2012-10-22 17:26:36 -07:00
Luqman Aden
48582b360c Replace rust_atomic_increment/decrement and rust_compare_and_swap_ptr with intrinsics. 2012-10-21 22:43:28 -04:00
Ben Striegel
ac81fff229 Remove old fixed-length vector syntax 2012-10-20 17:50:46 -07:00
Graydon Hoare
89de49cecd core: add 3rd proposed interface (trap/in) to conditions. 2012-10-19 14:46:49 -07:00
Mahmut Bulut
81e66ae1fb Renaming trait name UniqueStr to Trimmable 2012-10-19 11:59:40 -07:00
Tim Chevalier
8492a029e8 Fix Windows breakage 2012-10-19 11:44:01 -07:00
Tim Chevalier
10612ee30c Remove superfluous by-ref in option::get, option::get_default, option::expect
Superficial change, no review.
2012-10-19 11:38:28 -07:00
Graydon Hoare
c97944fbf8 core: add potential "simpler interface" to core::condition, also reduce TLS hits. 2012-10-18 20:08:14 -07:00
Graydon Hoare
6c4ad31f76 core: Add type params to condition handling so interface is safe. 2012-10-18 20:08:14 -07:00
Graydon Hoare
acf2d208d6 core: add previous-handler save and restore for proper nesting. 2012-10-18 14:51:20 -07:00
Erick Tryzelaar
eeae55208c Revert "Simplify str::to_managed"
This reverts commit ac50046a11.
2012-10-18 14:26:06 -07:00
Tim Chevalier
7dda889056 Merge pull request #3803 from tychosci/readclose
Make some string operations UTF-8 safe
2012-10-18 14:05:09 -07:00
Erick Tryzelaar
fe41ccec64 Rename str::to_unique to str::to_owned. 2012-10-18 11:04:59 -07:00
Erick Tryzelaar
ac50046a11 Simplify str::to_managed 2012-10-18 11:04:32 -07:00
Erick Tryzelaar
a7ecde3323 libcore: minor code cleanup.
This is minor and probably completely inconsequential to performance,
but I find vec::map to be more clear than vec::each and a push.
2012-10-18 10:09:57 -07:00
Erick Tryzelaar
95423d28f2 libcore: call [u8] values bytes, not bufs 2012-10-18 10:09:42 -07:00
Erick Tryzelaar
e3b1471acd Rewrite io::ByteBuf into a struct 2012-10-18 09:06:53 -07:00
Erick Tryzelaar
b18a15171b Make with_bytes_reader/with_bytes_writer pure 2012-10-18 09:04:47 -07:00
Tycho Sci
c0cee3ebe4 libcore: Make run::program_output UTF-8 safe 2012-10-18 23:27:55 +09:00
Graydon Hoare
fdd7b4d8f4 core: first working sketch of a condition system. 2012-10-17 16:40:34 -07:00
Philipp Brüschweiler
e7e1bab27f libsyntax: refactor the parser to consider foreign items as items
parse_item_or_view_item() would drop visibility if none of the conditions
following it would hold. This was the case when parsing extern {} blocks,
where the function was only used to parse view items, but discarded the
visibility of the first not-view item.
2012-10-17 15:34:55 -07:00
Tim Chevalier
7dde840dc6 Fix copy warnings in str 2012-10-17 15:34:54 -07:00
Tim Chevalier
d9f1426e69 Fix copy warnings in str 2012-10-17 13:47:45 -07:00
Tim Chevalier
33adb7a824 Merge pull request #3739 from killerswan/usagemsg
Add a module to getopts for verbose option group declaration (and use it in rustc)
2012-10-17 13:05:04 -07:00
Kevin Cantu
32baf1c54c Add a module to getopts to support verbose option definition
This is built on top of the existing functionality, but
adds a `groups` module which defines functions allowing
the user to specify whole short/long/description groups
at once and provides a usage message.
2012-10-17 12:10:06 -07:00
Tim Chevalier
ebce09702f Merge pull request #3706 from erickt/str-with-capacity
libcore: add a str::with_capacity to match the fn in vec
2012-10-17 11:03:58 -07:00
Patrick Walton
91ae5412d8 rustc: Merge module and type namespaces. r=brson 2012-10-15 15:35:36 -07:00
Gareth Daniel Smith
07edf90367 Implement to_managed without using an upcall function, as suggested by brson. 2012-10-13 05:57:13 -07:00
Gareth Daniel Smith
e9caa3fe2e Add an &str.to_managed method to allow creating non-constant @str values (for issue #3433). 2012-10-13 05:57:13 -07:00
Tim Chevalier
30a62793fa Make moves explicit in core tests 2012-10-12 20:43:37 -07:00
Graydon Hoare
57b4d10ff6 bump version to 0.5. 2012-10-12 16:41:32 -07:00
Tim Chevalier
945d57a6ff Export VecUnboxedRepr from vec so a test case can use it 2012-10-11 17:58:45 -07:00
Tim Chevalier
66cea3700e Fix from_buf in test cases 2012-10-11 16:45:57 -07:00
Tim Chevalier
6854265161 Remove comment that is now false 2012-10-11 16:00:30 -07:00
Tim Chevalier
27490769ce Update FIXME number 2012-10-11 16:00:30 -07:00
Tim Chevalier
fc4da29b4f Update FIXME number 2012-10-11 16:00:30 -07:00
Tim Chevalier
71813b3793 Exports are fixed, hooray 2012-10-11 16:00:30 -07:00
Tim Chevalier
f6606aff6e Remove invalid FIXME 2012-10-11 16:00:29 -07:00
Tim Chevalier
1ab914df1d Write option::chain and result::chain with match move
Closes #3590
2012-10-11 14:17:59 -07:00
Tim Chevalier
5a8ba073bc Make to_str pure and fix const parameters for str-mutating functions
Two separate changes that got intertwined (sorry):

Make to_str pure. Closes #3691

In str, change functions like push_char to take an &mut str instead of
an &str. Closes #3710
2012-10-11 14:17:59 -07:00
Daniel Patterson
c765c59ab1 core::str - making StrSlice trait functions pure 2012-10-09 19:59:17 -04:00
Erick Tryzelaar
bdc1b7a8a7 libcore: add a str::with_capacity to match the fn in vec 2012-10-09 08:52:46 -07:00
Erick Tryzelaar
6ced454b96 libcore: add pop/swap/consume to SendMap 2012-10-08 14:03:10 -07:00
Erick Tryzelaar
79603f573e libcore: include the trim methods in the StrSlice trait 2012-10-08 08:18:09 -07:00
Erick Tryzelaar
bb1ed97ca2 libcore: str trim functions can be applied to &strs 2012-10-08 08:08:06 -07:00
Erick Tryzelaar
0e7571b060 libcore Fix the tuple first_ref test 2012-10-07 20:30:17 -07:00
Erick Tryzelaar
91b7a9a529 libcore: add first_ref and second_ref to tuples 2012-10-07 17:20:19 -07:00
Tim Chevalier
05999290e2 Finally removing all uses of by-mut-ref
The code for the mode itself is still there.
2012-10-05 21:03:40 -07:00
Tim Chevalier
45345bda6a Remove uses of mutable ref mode.
It's still in the compiler right now, but warned about
2012-10-05 16:57:37 -07:00
Tim Chevalier
f8bc0d2545 Revert "wip"
This reverts commit ca49fd402a.
2012-10-05 16:10:08 -07:00
Tim Chevalier
ca49fd402a wip 2012-10-05 15:39:12 -07:00
Tim Chevalier
e16dbb7888 Demode some code using by-mutbl-ref; warn about by-mutbl-ref
The parser now warns about use of mutbl-ref mode, though it's kind
of a lie since this commit doesn't remove support for the mode.

Changed move_val_init to have stage0 and stage1/2 versions, the latter of
which is demoded.

Changed the type that the typechecker expects the move_val_init
intrinsic to have. After this is pushed, I can make a new snapshot,
which will remove the need for the stage0 versions.
2012-10-05 15:37:01 -07:00
Brian Anderson
e46e97fc9a Silence most of the remaining warnings 2012-10-05 11:53:24 -07:00
Brian Anderson
2f6f0b55fc core: Correct description of cast::forget
'managed' means something different now
2012-10-05 01:59:37 -06:00
Tim Chevalier
8fc60af441 Remove by-copy mode from std, mostly
One instance remains in net_tcp due to a foreign fn. Lots of
instances remain in serialization.rs, but IIRC that is being removed.

I had to do unholy things to task-perf-word-count-generic to get it
to compile after demoding pipes. I may well have messed up its
performance, but it passes.
2012-10-04 19:59:47 -07:00
Tim Chevalier
4155a60c75 Fix FIXME that's no longer blocked by #2611 2012-10-04 19:43:32 -07:00
Tim Chevalier
202c8fd0eb Kill bootstrapping code in ptr 2012-10-04 16:48:57 -07:00
Tim Chevalier
65c96f849f Forbid deprecated modes again in core
Sadly, there's only one file that requires deprecated modes
(stackwalk)... So, forbid them everywhere else.
2012-10-04 16:48:57 -07:00
Tim Chevalier
fe12da0864 De-mode comm::Chan 2012-10-04 16:48:57 -07:00
Tim Chevalier
777baeb298 Remove code that was waiting for a snapshot
extfmt is now demoded
2012-10-04 16:48:56 -07:00
Graydon Hoare
c37c243e95 Remove some residue, core is effectively de-exported now. Close #3583. 2012-10-04 16:08:08 -07:00
Brian Anderson
c83218de12 core: Improve option docs a little 2012-10-04 15:15:09 -07:00
Graydon Hoare
6ffce1a1c3 De-export extfmt. Part of #3583. 2012-10-04 13:50:02 -07:00
Brian Anderson
ae42318bef core: Make some parts of task private 2012-10-03 22:07:11 -07:00
Patrick Walton
82fd71137a libcore: De-export core.rc and core.rs 2012-10-03 19:40:25 -07:00
Graydon Hoare
a1ab0cd6a8 Sub-uses from libc should be pub. 2012-10-03 15:14:56 -07:00
Graydon Hoare
365f174838 Attempt to fix os::args errors on various platforms. 2012-10-03 15:02:22 -07:00
Patrick Walton
2f451a7bd7 rustc: Only allow imports marked with "pub" to be imported from other modules 2012-10-02 18:15:19 -07:00
Graydon Hoare
8a5545e9cd Fix long line. 2012-10-02 16:32:45 -07:00
Graydon Hoare
c31a88c7f4 De-export the submodules of task. Part of #3583. 2012-10-02 16:32:00 -07:00
Patrick Walton
2df168812d libcore: Implement os::args() on Windows 2012-10-02 15:33:44 -07:00
Tim Chevalier
f78cdcb636 Removing explicit uses of + mode
This removes most explicit uses of the + argument mode. Pending a
snapshot, I had to remove the forbid(deprecated_modes) pragma from
a bunch of files. I'll put it back!

+ mode still has to be used in a few places for functions that get
moved (see task.rs)

The changes outside core and std are due to the to_bytes trait and
making the compiler (with legacy modes on) agree with the libraries
(with legacy modes off) about modes.
2012-10-02 14:31:39 -07:00
Daniel Patterson
0b9a47a189 core::rand - adding rand::random(), a shortcut to generate a uint with task-local rng 2012-10-02 17:15:14 -04:00
Patrick Walton
9284179311 libstd: Switch off legacy modes in both core and std. 2012-10-02 12:20:06 -07:00
Graydon Hoare
b787a26534 De-export comm, task. Part of #3583. 2012-10-02 12:05:08 -07:00
Daniel Patterson
6c7459de99 core::rand - adding test for task_rng() 2012-10-02 11:23:32 -07:00
Daniel Patterson
c7354e6c10 core::rand - adding task local lazily initialized rng, as per #3439 2012-10-02 11:23:32 -07:00
Brian Anderson
4d30b34673 core: Add implementation of real_args for FreeBSD 2012-10-02 10:31:37 -07:00
Niko Matsakis
b1506c3150 silence warning 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
8fc3088b2a rename vec::raw::form_slice to buf_as_slice
This matches the str::raw function.
2012-10-01 20:44:30 -07:00
Brian Anderson
8b094c36aa Merge pull request #3638 from dbp/typo
core::task - typo in comment
2012-10-01 19:36:58 -07:00
Daniel Patterson
ebdb4b7ef7 core::task - typo in comment 2012-10-01 22:21:41 -04:00
Graydon Hoare
7ead3c0411 De-export dlist, dvec. Part of #3583. 2012-10-01 17:50:44 -07:00
Graydon Hoare
39f114d171 De-export iter and result. Part of #3583. 2012-10-01 17:27:56 -07:00
Graydon Hoare
e480e19694 Attempt to fix option::test_unwrap_str breakage. 2012-10-01 16:14:30 -07:00
Graydon Hoare
9c8ff35727 De-export either. Part of #3583. 2012-10-01 16:11:37 -07:00
Graydon Hoare
c042e06908 De-export vec. Part of #3583. 2012-10-01 16:11:17 -07:00
Patrick Walton
4c3fede84f libcore: Fix tidy error 2012-10-01 16:02:17 -07:00
Patrick Walton
9fe40e8a7b libcore: Allow the command line arguments to be set on a per-task basis 2012-10-01 15:35:04 -07:00
Tim Chevalier
b18320446e Move over to calling ptr::addr_of
Everything should now call ptr::addr_of instead of
ptr::p2::addr_of. Only the pipes macro code when compiled
by stage0 will call ptr::p2::addr_of. Needs a snapshot to get
rid of that.
2012-10-01 15:12:09 -07:00
Tim Chevalier
72ae42627b Call 'new' instead of 'old' extfmt code, preparing for snapshot 2012-10-01 15:12:09 -07:00
Patrick Walton
9b4db17630 libcore: Implement a sys::args() on Mac 2012-10-01 14:36:55 -07:00
Graydon Hoare
1229d1c2ce De-export option and option_iter. Part of #3583. 2012-10-01 14:12:36 -07:00
Graydon Hoare
db44dc5cf2 De-export gc and io. Part of #3583. 2012-10-01 14:09:44 -07:00
Gareth Daniel Smith
1c76d189c0 When a vec/str bounds check fails, include the bad index and the length of the str/vec in the fail message. 2012-09-30 14:55:56 -07:00
Brian Anderson
affa3880de core: Fix unsafe code in spawn_raw 2012-09-29 16:33:53 -07:00