Commit Graph

16158 Commits

Author SHA1 Message Date
bors
48cb9a8ac0 auto merge of #5303 : brson/rust/newsched4, r=brson
r?

Followup to #5022. This is the same, but everything is in `core::rt` now. `std::uv_ll` is moved to `core::unstable::uvll`, with the intent that it eventually move into its own crate (blocked on #5192 at least). I've had to disable the uv tests because of #2064. All of `core::rt` is disabled on platforms that aren't mac or linux until I complete the windows thread local storage bindings and ARM context switching.

My immediate next priorities will be to fix #2064 and clean up the uv bindings, get everything building on all platforms.
2013-03-11 20:21:45 -07:00
Ben Kelly
4f4f69d731 Fix std::getopts::opts_present() to check value.
Currently the opts_present() function only checks to see if the option is
configured in the match, but doesn't actually check to see if the option
value has been set.  This means that opt_present('h') may return false while
opts_present([~'h']) returns true.

Add a test case to catch this condition and fix opts_present() to check
the value before returning true.

Note, there is another API difference between these two functions that this
does not address.  Currently if you pass a non-configured option to
opt_present() the program will fail!(), but opts_present() simply returns
false.  If it is acceptable to standardize on the fail!() then opts_present()
should probably be implemented in terms of the opt_present() function.
2013-03-11 23:12:31 -04:00
Ben Striegel
a21b43c6bb Implement Add on Option types
This will allow you to use the + operator to add together any two
Options, assuming that the contents of each Option likewise implement
+. So Some(4) + Some(1) == Some(5), and adding with None leaves the
other value unchanged.

This might be monoidic? I don't know what that word means!
2013-03-11 22:46:16 -04:00
Brian Anderson
676e0290ed core: Add rt mod and add the new scheduler code 2013-03-11 19:44:29 -07:00
Daniel Micay
9b1a9ec4ea treemap: fix a bug in the union implementation 2013-03-11 22:36:23 -04:00
Daniel Micay
2889a8a4e5 treemap: add more set tests 2013-03-11 22:36:23 -04:00
Daniel Micay
66afa5d17a treemap: refactor the set operation tests 2013-03-11 22:36:19 -04:00
Brian Anderson
5d3d0890a7 Work on 0.6 release notes 2013-03-11 18:29:13 -07:00
bors
a6bb4a0f1a auto merge of #5292 : thestinger/rust/nil, r=graydon 2013-03-11 17:27:43 -07:00
bors
f4dba956ec auto merge of #5322 : brson/rust/4812, r=brson
Supersedes #5013
2013-03-11 16:39:43 -07:00
Brian Anderson
7e5995197f core: Convert obsolete fn syntax 2013-03-11 15:42:00 -07:00
Jeff Olson
3aa92a91c9 core: convert asserts to fail_unless! 2013-03-11 15:38:55 -07:00
Jeff Olson
5ff66f0405 core: link pthreads explicitly in linux build 2013-03-11 15:38:55 -07:00
Jeff Olson
cf82360e72 core: formatting appeasement 2013-03-11 15:38:55 -07:00
Jeff Olson
a04ba76f8e core: fix broken tests on windows 2013-03-11 15:38:55 -07:00
Jeff Olson
25c3c363a8 core: change import of exchange_alloc for win32 os::_list_dir 2013-03-11 15:38:55 -07:00
Jeff Olson
a69a2acfba rt/core: port os::list_dir to rust ref #4812 2013-03-11 15:38:55 -07:00
Jeff Olson
53db6c7e2a core: rt/core: impl os::env() in rust ref #4812 2013-03-11 15:38:55 -07:00
Jeff Olson
4bc26ce575 rt/core: impl os::getcwd() in rust ref #4812 2013-03-11 15:38:55 -07:00
Brian Leibig
6152425180 More descriptive error messages for debug info tests 2013-03-11 14:09:06 -07:00
Brian Leibig
f1928d8e2c Re-enable struct value printing in debug info tests with gdb pretty printing off 2013-03-11 14:09:06 -07:00
Brian Leibig
c913eff51d Disable struct value printing in debug info tests
This is due to the way different versions of gdb print out structs: older versions have them always spread out with fields on different lines, while newer versions will compactly print them on one line. This makes it hard for the output checker to verify the expected output.
2013-03-11 14:09:06 -07:00
Brian Leibig
c978025d0d Debuginfo revamp 2013-03-11 14:09:06 -07:00
bors
878a31066d auto merge of #5305 : brson/rust/mut_buf_as_slice, r=brson
r?

Like `buf_as_slice` but for mutable pointers and slices.
2013-03-11 14:06:50 -07:00
Brian Anderson
c88ce30c48 core: Add vec::raw::mut_buf_as_slice 2013-03-11 13:44:32 -07:00
bors
e9a0db6abd auto merge of #5318 : jdm/rust/deriving_cell, r=pcwalton
r? @pcwalton
2013-03-11 13:15:52 -07:00
Josh Matthews
86cf248262 Add deriving_eq to Cell. 2013-03-11 15:23:45 -04:00
Daniel Micay
d55225f04a treemap: add more tests for set difference 2013-03-11 15:02:55 -04:00
Daniel Micay
ad16fecc33 treemap: inline the TreeSet wrappers 2013-03-11 15:02:50 -04:00
Daniel Micay
a5c88366f8 treemap: indentation fixes 2013-03-11 15:02:18 -04:00
Daniel Micay
58cec70127 treemap: make set_advance public 2013-03-11 15:02:15 -04:00
bors
ce24ebb858 auto merge of #5314 : jld/rust/adt-simplification, r=pcwalton
Struct and enum representations have some complicatedness that's no longer needed.  Now that everything's in one place and has access to anything we'd want to know about the type, flatten some of that out.  Slight changes to representations in some cases.
2013-03-11 11:54:49 -07:00
bors
2ebb67487c auto merge of #5291 : pcwalton/rust/drop-lint, r=pcwalton
r? @nikomatsakis
2013-03-11 10:15:58 -07:00
Patrick Walton
08c840205e librustc: Lint the old drop destructor notation off 2013-03-11 09:36:00 -07:00
Patrick Walton
7353568cd8 librustc: Remove old-style operator overloading 2013-03-11 09:36:00 -07:00
Patrick Walton
1274d4a006 test: Fix tests. rs=tests 2013-03-11 09:36:00 -07:00
Patrick Walton
a34749c289 libsyntax: Stop parsing newtype enums 2013-03-11 09:36:00 -07:00
Patrick Walton
1fcb0443cf doc: Remove documentation on newtype enums. 2013-03-11 09:35:59 -07:00
Patrick Walton
7538450b8d libsyntax: Remove newtype enums from libsyntax. rs=deenum 2013-03-11 09:35:59 -07:00
Patrick Walton
dc4869945c librustc: Remove newtype enums from librustc 2013-03-11 09:35:59 -07:00
Patrick Walton
4faf63e472 libstd: Remove all newtype enums from std and core. 2013-03-11 09:35:59 -07:00
Patrick Walton
e48446d060 test: Remove newtype enums from the test suite. rs=deenum 2013-03-11 09:35:58 -07:00
Patrick Walton
bd2d17e4a1 libsyntax: Stop parsing bare functions in preparation for switching them over 2013-03-11 09:35:58 -07:00
Patrick Walton
d18f785457 librustc: Replace all uses of fn() with &fn(). rs=defun 2013-03-11 09:35:58 -07:00
bors
51cdca0bf0 auto merge of #5122 : sanxiyn/rust/vec-match-tail-2, r=nikomatsakis
Incorporated @nikomatsakis's comments from #4748.

Fix #4635.
2013-03-11 04:27:48 -07:00
Seo Sanghyeon
070137ce90 Add one more test for vector destructuring 2013-03-11 19:53:41 +09:00
Seo Sanghyeon
9e85589ad3 Implement vector destructuring from tail 2013-03-11 19:01:51 +09:00
Jed Davis
9eaa608b04 Get rid of the Unit enum representation.
The only thing we really lose is that C-like enums with one variant and a
non-zero discriminant now take up space, but I do not think this is a
common usage.  As previously noted, that was mostly there for
transitional compatibility with the pre-adt.rs codebase.
2013-03-11 00:01:04 -07:00
Jed Davis
e6b5e00ea2 Simplify struct representation.
Out goes the extra layer of struct wrapping; the destructedness flag is
added to the end of the struct.  This means that, if the struct
previously had alignment padding at the end, the flag will live there
instead of increasing the struct size.
2013-03-10 23:57:38 -07:00
bors
58618fb8cf auto merge of #5308 : wanderview/rust/std-getopts-rustdoc-fix, r=luqmana
There were three issues effecting the example in the getopts rustdoc:

1. The blockquote was incorrectly formatted.  Fixed by switching to using
   an explicit markdown code section with ```.
2. The `fail fail_str(f)` would not compile.  Fixed by using `fail!()` instead
   of `fail`.
3. The line `matches.free[0]` produced a compile error about moving from
   an immutable vector.  Fix by using `copy`.
2013-03-10 21:39:46 -07:00