Commit Graph

21431 Commits

Author SHA1 Message Date
Eric Reed
97555e865c Derive Clone for IpAddr and SocketAddr 2013-08-19 16:26:50 -07:00
Graydon Hoare
2c7164595f rt: make jemalloc header conform to android signature. 2013-08-19 16:09:46 -07:00
Kevin Ballard
aeb06f2fb1 Fix broken rusti
Commit 0932ab336 accidentally broke rusti by making it parse the binary
name as the input, instead of parsing what the user typed.
2013-08-19 16:00:33 -07:00
Tim Chevalier
d9293d1d87 rustpkg: Un-ignore most of the remaining tests
This necessitated some cleanup to how we parse library filenames
when searching for libraries, since rustpkg may now create filenames
that contain '-' characters. Also cleaned up how rustpkg passes the
sysroot to a custom build script.
2013-08-19 15:27:21 -07:00
Graydon Hoare
610b2b58ec compiletest: do not run tests in sub-threads if on valgrind. 2013-08-19 15:09:20 -07:00
Graydon Hoare
19f4ae1415 Try to fix mac valgrind bot by disabling thread-heavy activities. 2013-08-19 15:09:20 -07:00
Graydon Hoare
29a449aae3 Add tests for cross-crate condition handling. Close #5446. 2013-08-19 15:09:20 -07:00
Graydon Hoare
eaa378033c test: add testcase, close #4929 which was already fixed. 2013-08-19 15:09:20 -07:00
Graydon Hoare
8c78311e81 test: un-xfail now working run-pass/foreign-struct.rs, close #2334. 2013-08-19 15:09:19 -07:00
bors
e6e678fac7 auto merge of #8623 : pnkfelix/rust/fsk-visitor-vpar-defaults-step4, r=nmatsakis
Follow up to #8619 (step 3 of 5).

(See #8527, which was step 1 of 5, for the full outline.)

Part of #7081.
2013-08-19 15:02:07 -07:00
Kevin Ballard
8aa47990da Don't skip token after @'static
Fixes #8615.
2013-08-19 14:55:35 -07:00
bors
4bdceb9c00 auto merge of #8459 : thestinger/rust/checked, r=graydon 2013-08-19 12:42:48 -07:00
toddaaro
e5ccf13668 clean whitespace :/ 2013-08-19 12:01:13 -07:00
Jed Davis
46672d2b06 Remove discriminant symbols.
Given that bootstrapping and running the testsuite works without
exporting discriminant values as global constants, I conclude that
they're unused and can be removed.
2013-08-19 11:34:43 -07:00
Michael Sullivan
6a6d3b600f Make supertrait methods callable on object types.
This requires changes to method search and to codegen. We now emit a
vtable for objects that includes methods from all supertraits.
Closes #4100.

Also, actually populate the cache for vtables, and also key it by type
so that it actually works.
2013-08-19 11:08:07 -07:00
Michael Sullivan
dc9b3e37e2 Rangechange the log message truncation limit. 2013-08-19 09:35:51 -07:00
bors
2246d56e71 auto merge of #8619 : pnkfelix/rust/fsk-visitor-vpar-defaults-step3, r=nmatsakis
Follow up to #8539 (step 2 of 5).

(See  #8527, which was step 1 of 5, for the full outline.)

Part of #7081.
2013-08-19 09:12:03 -07:00
blake2-ppc
8fe8302887 std::str: Use iterators instead of while loops for CharSplitIterator
Embed an iterator in the CharSplitIterator struct, and combine that with
the former bool `only_ascii`; so use an enum instead.
2013-08-19 16:11:45 +02:00
bors
d597f54fc2 auto merge of #8539 : pnkfelix/rust/fsk-visitor-vpar-defaults-step2, r=graydon,nikomatsakis
r? @nikomatsakis

Follow up to #8527 (which was step 1 of 5).  See that for overall description 

Part of #7081
2013-08-19 06:52:03 -07:00
bors
81a78161b5 auto merge of #8535 : nikomatsakis/rust/issue-3678-wrappers-be-gone-2, r=graydon
Long-standing branch to remove foreign function wrappers altogether. Calls to C functions are done "in place" with no stack manipulation; the scheme relies entirely on the correct use of `#[fixed_stack_segment]` to guarantee adequate stack space. A linter is added to detect when `#[fixed_stack_segment]` annotations are missing. An `externfn!` macro is added to make it easier to declare foreign fns and wrappers in one go: this macro may need some refinement, though, for example it might be good to be able to declare a group of foreign fns. I leave that for future work (hopefully somebody else's work :) ).

Fixes #3678.
2013-08-19 04:32:04 -07:00
Niko Matsakis
0479d946c8 Add externfn macro and correctly label fixed_stack_segments 2013-08-19 07:13:15 -04:00
Niko Matsakis
303f650ecf Issue #3678: Remove wrappers and call foreign functions directly 2013-08-19 07:13:15 -04:00
Kevin Ballard
4d97b6e445 Fix some parsing errors in extra::url
Fixes issue #8612.
2013-08-19 02:27:57 -07:00
blake2-ppc
30ab96b272 std::str: Improve comments for CharIterator 2013-08-19 11:20:00 +02:00
blake2-ppc
5eff3e1bd9 std::str: Use CharOffsetIterator in slice_chars 2013-08-19 11:20:00 +02:00
blake2-ppc
8931ad9e52 std::str: Only check char boundary for end index in .slice_to() 2013-08-19 11:20:00 +02:00
blake2-ppc
f33a30e7e8 std::str: Correct docstrings for lack of null terminator in ~str and &str 2013-08-19 11:20:00 +02:00
blake2-ppc
595dd843d7 std::str: Use CharOffsetIterator in .find() and .rfind() 2013-08-19 11:20:00 +02:00
blake2-ppc
db3eb7291a std::str: Implement CharIterator separately
Let CharIterator be a separate type from CharOffsetIterator (so that
CharIterator can be cloned, for example).

Implement CharOffsetIterator by using the same technique as the method
subslice_offset.
2013-08-19 11:20:00 +02:00
blake2-ppc
8a5889d2a2 std::str: Add str::raw::slice_unchecked
Add a function like raw::slice_bytes, but it doesn't check slice
boundaries. For iterator use where we always know the begin, end indices
are in range.
2013-08-19 11:19:59 +02:00
blake2-ppc
3cb5b8dc18 std::str: Special case char_range_at_reverse so it is faster
Implement char_range_at_reverse similarly to char_range_at, instead of
re-using that method.
2013-08-19 11:19:59 +02:00
blake2-ppc
4043c70f23 std::str: Small fix for slice 2013-08-19 11:19:59 +02:00
blake2-ppc
548bdbaa29 std::str: Bench test for char iterators 2013-08-19 11:19:59 +02:00
bors
3e4f40ec5a auto merge of #8564 : alexcrichton/rust/ifmt+++, r=graydon
See discussion in #8489, but this selects option 3 by adding a `Default` trait to be implemented by various basic types.

Once this makes it into a snapshot I think it's about time to start overhauling all current use-cases of `fmt!` to move towards `ifmt!`. The goal is to replace `%X` with `{}` in 90% of situations, and this commit should enable that.
2013-08-19 01:42:05 -07:00
Kevin Ballard
ac3bc9cfcc Fix mod_floor() for uint primitive types 2013-08-19 01:01:11 -07:00
Kevin Ballard
8741770471 Update size_hint()s on std::iterator Iterators
Add size_hint() to a few Iterators that were missing it.

Update a couple of existing size_hint()s to use checked_add() instead of
saturating_add() for the upper bound.
2013-08-18 22:33:32 -07:00
Kevin Ballard
c64f96361e Implement .size_hint() on new vec iterators 2013-08-18 21:58:56 -07:00
bors
c178b52fe5 auto merge of #8556 : sfackler/rust/quote, r=alexcrichton
They previously required one called "ext_cx" to be in scope.

Fixes part of #7727
2013-08-18 21:51:58 -07:00
bors
557ff049f0 auto merge of #8565 : bblum/rust/select-bugfix, r=brson
@brson grilled me about how this bugfix worked the first time around, and it occurred to me that it didn't in the case where the task is unwinding. Now it will.
2013-08-18 19:32:36 -07:00
Steven Fackler
b66cdb16fe Delete std::rt::io::net::http
It's an empty stub and as one of the comments notes, doesn't belong in
libstd.
2013-08-18 20:32:35 -04:00
bors
8fff3f40f2 auto merge of #8561 : kballard/rust/do-block-internal-err-msg, r=thestinger
When using a `do` block to call an internal iterator, if you forgot to
return a value from the body, it would tell you

    error: Do-block body must return bool, but returns () here. Perhaps
    you meant to write a `for`-loop?

This advice no longer applies as `for` loops are now for external
iterators. Delete this message outright and let it use the default error
message

    error: mismatched types: expected `bool` but found `()`

r? @thestinger
2013-08-18 17:12:02 -07:00
bors
b26e11db86 auto merge of #8560 : kballard/rust/reserve-yield, r=pcwalton
Rename task::yield() to task::deschedule().

Fixes #8494.
2013-08-18 15:02:04 -07:00
Andreas Martens
cc0c6fd43c Add assertions and cross crate tests 2013-08-18 22:17:47 +02:00
Vadim Chugunov
ed6694a9b5 Fixed -Z print-link-args 2013-08-18 13:06:35 -07:00
bors
e185b049af auto merge of #8545 : blake2-ppc/rust/iterbytes, r=alexcrichton
Address issue #5257, for example these values all had the same hash value:

	("aaa", "bbb", "ccc")
	("aaab", "bb", "ccc")
	("aaabbb", "", "ccc")

IterBytes for &[A] now includes the length, before calling iter_bytes on
each element.

IterBytes for &str is now terminated by a byte that does not appear in
UTF-8. This way only one more byte is processed when hashing strings.
2013-08-18 12:41:59 -07:00
Andreas Martens
29ab2daa5e Add assertions to test 2013-08-18 21:37:40 +02:00
Andreas Martens
a1066130c0 Fix ICE when calling static and static function pointers
Fixes #8588
2013-08-18 20:21:23 +02:00
Steven Fackler
8b80922a4c quote_*! macros take an ExtCtx
They previously required one called "ext_cx" to be in scope.

Fixes part of #7727
2013-08-18 13:14:15 -04:00
bors
88bd2155d7 auto merge of #8558 : kballard/rust/xorshift-seed, r=cmr
Fixes #8359.
2013-08-18 10:01:55 -07:00
blake2-ppc
bfa1331cd7 std:#️⃣ Add testcase for colliding hashes of tuples
Add a testcase that verifies that (s, t) and (u, v) don't collide even if
s + t == u + v (concatenation).
2013-08-18 18:39:47 +02:00