Commit Graph

32040 Commits

Author SHA1 Message Date
bors
821afc4ce8 auto merge of #16932 : crabtw/rust/mips, r=alexcrichton
Add missing liblibc constants
2014-09-03 19:41:12 +00:00
Ruud van Asseldonk
0b4912b9af libtime: Fix adding negative duration to Timespec. 2014-09-03 21:28:54 +02:00
bors
9b81a4eef8 auto merge of #16811 : nick29581/rust/dst-bug-2, r=nikomatsakis
closes #16800 
r? @nikomatsakis - I'm not 100% sure this is the right approach, it is kind of ad-hoc. The trouble is we don't have any intrinsic notion of which types are sized and which are not, we only have the Sized bound, so I have nothing to validate the Sized bound against.
2014-09-03 17:51:05 +00:00
bors
6ac4a30810 auto merge of #16634 : apoelstra/rust/to-option-fix, r=aturon
As outlined in

  https://aturon.github.io/style/naming/conversions.html

`to_` functions names should only be used for expensive operations.
Thus `to_option` is better named `as_option`. Also, putting type
names into method names is considered bad style; what the user is
really trying to get is a reference. This `as_ref` is even better.

Also, we are missing a mutable version of this method.

Finally, there is a bug in the signature of `to_option` which has
been around since lifetime elision: originally the returned reference
had 'static lifetime, but since the elision changes this become
the lifetime of the raw pointer (which does not make sense, since
the pointer lifetime and referent lifetime are unrelated). We fix
the bug to return a reference with a fresh lifetime which will be
inferred from the calling context.

[breaking-change]
2014-09-03 16:01:12 +00:00
bors
8a8986776d auto merge of #16956 : nick29581/rust/unsized-test-1, r=alexcrichton
I landed this disabled, but it now passes since @pcwalton implemented RFC 11

r?
2014-09-03 14:11:09 +00:00
NODA, Kai
d90921a9d8 libnative/io/file_unix: remove superfluous retry().
These syscalls don't return EINTR:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstatat.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/utime.html
2014-09-03 19:31:46 +08:00
Huon Wilson
5c819186ed bitv: add larger tests, better benchmarks & remove dead code.
There were no tests for iteration etc. with more than 5 elements,
i.e. not even going beyond a single word. This situation is rectified.

Also, the only benchmarks for `set` were with a constant bit value,
which was not indicative of every situation, due to inlining & branch
removal. This adds a benchmark at the other end of the spectrum: random
input.
2014-09-03 20:07:08 +10:00
bors
3ce5a026b0 auto merge of #16940 : treeman/rust/fail-non-utf8, r=pnkfelix
Closes #16877.
2014-09-03 09:21:02 +00:00
bors
b7d456dfea auto merge of #16934 : nick29581/rust/dst-bug-6, r=pcwalton
Closes #16911 

r?
2014-09-03 06:26:02 +00:00
Nick Cameron
69a9d23d58 Enable a test for correct treatment of Sized? 2014-09-03 16:50:18 +12:00
Nick Cameron
ab3999f615 Handle custom deref returning fat pointers
Closes #16930
2014-09-03 15:31:36 +12:00
Nick Cameron
7d72bdb226 Fix ICE when casting &[T] to *const [T]
Closes #16947
2014-09-03 15:22:32 +12:00
bors
f7ec95efbb auto merge of #16917 : nick29581/rust/cross-trait, r=pcwalton
Closes #15349

r? @pcwalton (or anyone else)
2014-09-03 02:40:59 +00:00
bors
2e38581792 auto merge of #16892 : andrew-d/rust/andrew-fix-test-reexports, r=sfackler
Fixes #16597

I'm not 100% sure this is the correct way to handle this - but I wasn't able to find a better way without doing way more refactoring of the code that I was comfortable with.  Comments and criticism are appreciated 😄
2014-09-03 00:51:00 +00:00
bors
4e5d5ba1ed auto merge of #16850 : vks/rust/hash-num, r=alexcrichton
Updates #15294.
2014-09-02 23:01:06 +00:00
bors
0e7e107ad6 auto merge of #16944 : alexcrichton/rust/ignore-gdb-pretty, r=brson
These tests are blocking a linux nightly and a new snapshot, so ignore them for
now. Their tracking issue is #16919.
2014-09-02 21:11:05 +00:00
Nick Cameron
7f72884f13 Remove cross-borrowing for traits.
Closes #15349

[breaking-change]

Trait objects are no longer implicitly coerced from Box<T> to &T. You must make an explicit coercion using `&*`.
2014-09-03 08:32:35 +12:00
Nick Cameron
e9bd650cad Schedule cleanup for &* on fat owned pointers
For example `let _x: &Trait = &*(box Foo as Box<Trait>);`. There was a bug where no cleanup would be scheduled by the deref.

No test because cleanup-auto-borrow-obj.rs is a test for this once we remove trait cross-borrowing (done on another branch).
2014-09-03 08:29:33 +12:00
bors
f4aafd6713 auto merge of #16916 : alexcrichton/rust/tcp-accept-stress-again-oh-my, r=brson
The tcp-accept-stress, despite the previous modifications, is still deadlocking
on the osx buildbots. When building/testing/running repeatedly locally, it was
discovered that the test would often fail with TcpStream::connect returning the
error `address not available`.

This test opens up quite a large number of sockets, and it looks like by default
osx isn't the speediest at recycling those sockets for further use.

The test has been modified (and verified) to not deadlock in this error case,
and the test is not just officially ignored on OSX (with no FIXME). I believe
that we'll get good coverage of the relevant code on the linux builders, so this
isn't so much of a loss.

At the same time I turned down the stress parameters to hopefully lighten the
socket load on other platforms.
2014-09-02 19:16:07 +00:00
Alex Crichton
b090905b17 test: Ignore failing gdb pretty tests
These tests are blocking a linux nightly and a new snapshot, so ignore them for
now. Their tracking issue is #16919.
2014-09-02 08:34:00 -07:00
Jonas Hietala
968b1280e3 Prevent failure when using fail! with invalid utf8.
Closes #16877.
2014-09-02 15:59:28 +02:00
Piotr Czarnecki
fc636ae8f4 std: Split hashmap.rs into modules 2014-09-02 14:59:07 +01:00
Piotr Czarnecki
9ddaaa4db0 std: RawTable exposes a safe interface for HashMap
Introduced a new growth algorithm.
2014-09-02 14:58:04 +01:00
Piotr Czarnecki
5b0d3adf3d std: branchless bucket distance for hashmap 2014-09-02 14:56:43 +01:00
bors
dfbd4669cd auto merge of #16925 : jbcrail/rust/doc-spelling-errors, r=alexcrichton
I fixed spelling mistakes in the documentation.
2014-09-02 10:31:04 +00:00
bors
e59a4584c9 auto merge of #16805 : nick29581/rust/dst-raw, r=nikomatsakis
r? @pnkfelix or @nikomatsakis
2014-09-02 08:46:05 +00:00
Nick Cameron
5520ea81a1 Reviewer changes 2014-09-02 19:47:39 +12:00
bors
0ff7bac2d8 auto merge of #16924 : steveklabnik/rust/manual_pointer_fix, r=pcwalton
This was brought up in IRC: https://botbot.me/mozilla/rust/2014-08-30/?msg=20733803&page=26
2014-09-02 07:01:07 +00:00
Nick Cameron
3c610af670 Fix ICE with static DST coercion
Closes #16911
2014-09-02 15:54:22 +12:00
Jyun-Yan You
97533294b4 Fix MIPS target
Add missing liblibc constants
2014-09-02 10:50:22 +08:00
Andrew Dunham
9374d50c30 ignore-pretty the test 2014-09-01 19:15:41 -07:00
Joseph Crail
7241267b93 doc: Fix spelling errors. 2014-09-01 20:52:38 -04:00
Nick Cameron
52d6d3be48 DST raw pointers - *-pointers are fat pointers 2014-09-02 10:05:00 +12:00
bors
0bdac78da8 auto merge of #16897 : japaric/rust/mut-slice-collection, r=alexcrichton 2014-09-01 21:31:00 +00:00
bors
01364c44a4 auto merge of #16867 : wickerwaka/rust/ice-16750, r=alexcrichton
Not sure if this is addressing the root cause or just patching up a symptom. Also not sure if I should be adding a diagnostic code for this.

Fixes #16750
Fixes #15812
2014-09-01 19:41:02 +00:00
Steve Klabnik
d32bfe8c2b Fix pointer types in the manual. 2014-09-01 14:03:00 -04:00
bors
3768ef477e auto merge of #16891 : eddyb/rust/patlit-from-expr-macros, r=kballard
Enables any macros using `MacExpr` to be treated as patterns when
they produce a literal in the form `ExprLit` (e.g. `stringify!` or `line!`).

Fixes #16876.
2014-09-01 16:45:59 +00:00
wickerwaka
2cb210d2c6 Updated to new extern crate syntax.
Added warning for old deprecated syntax
2014-09-01 09:02:00 -07:00
bors
eb7589a188 auto merge of #16886 : Tobba/rust/defailbloat-string, r=alexcrichton
by not performing formatting at the failure site

This cuts about 673382 bytes from libcore.rlib
2014-09-01 14:56:08 +00:00
bors
b42e079c6f auto merge of #16871 : retep998/rust/win64-fix, r=alexcrichton
It was in a x86_64 block so the buildbots didn't notice it.
Fixes #16905
2014-09-01 13:06:09 +00:00
bors
12b438c31b auto merge of #16802 : nick29581/rust/dst-bug-1, r=luqmana
Closes #16783 

r? @nikomatsakis
2014-09-01 07:51:02 +00:00
bors
0fd4f424da auto merge of #16844 : mrmonday/rust/liblibc-custom-socket, r=alexcrichton
These are the additions to liblibc required for raw/custom socket support. I've broken this into a separate pull request due to the upcoming I/O overhaul (was originally part of pull #15741).

cc @alexcrichton.
2014-09-01 06:01:08 +00:00
Alex Crichton
79f51c1d31 test: Tweak tcp-accept-stress one last time
The tcp-accept-stress, despite the previous modifications, is still deadlocking
on the osx buildbots. When building/testing/running repeatedly locally, it was
discovered that the test would often fail with TcpStream::connect returning the
error `address not available`.

This test opens up quite a large number of sockets, and it looks like by default
osx isn't the speediest at recycling those sockets for further use.

The test has been modified (and verified) to not deadlock in this error case,
and the test is not just officially ignored on OSX (with no FIXME). I believe
that we'll get good coverage of the relevant code on the linux builders, so this
isn't so much of a loss.

At the same time I turned down the stress parameters to hopefully lighten the
socket load on other platforms.
2014-08-31 22:14:50 -07:00
Nick Cameron
cc598e6f8e Second approach - using type contents 2014-09-01 09:48:19 +12:00
Carol Nichols
3dc9deb6e5 Make doc search results use <a> tags instead of js for navigating
This has the primary advantage of not interfering with browser default
behavior for links like being able to cmd/ctrl+click on a result to open
the result in a new tab but leave the current page as-is (previous
behavior both opened a new tab and changed the current tab's location to
the result's)
2014-08-31 17:11:42 -04:00
Simon Sapin
a049fb98cd Have std::io::TempDir::new and new_in return IoResult
This allows using `try!()`

[breaking-change]

Fixes #16875
2014-08-31 22:06:11 +02:00
bors
5dfb7a6ec1 auto merge of #16809 : nick29581/rust/dst-bug-3, r=alexcrichton
This corrects a rebasing error. Also adds a test so it won't happen again.

r?
2014-08-31 19:55:51 +00:00
Andrew Poelstra
00ff5aac4e Rename RawPtr::to_option() to RawPtr::as_ref()
As outlined in

  https://aturon.github.io/style/naming/conversions.html

`to_` functions names should only be used for expensive operations.
Thus `to_option` is better named `as_option`. Also, putting type
names into method names is considered bad style; what the user is
really trying to get is a reference. This `as_ref` is even better.

Also, we are missing a mutable version of this method. So add a
new trait `RawMutPtr` with a corresponding `as_mut` methode.

Finally, there is a bug in the signature of `to_option` which has
been around since lifetime elision: originally the returned reference
had 'static lifetime, but since the elision changes this become
the lifetime of the raw pointer (which does not make sense, since
the pointer lifetime and referent lifetime are unrelated). Fix
the bug to return a reference with a fresh lifetime (which will
be inferred from the calling context).

[breaking-change]
2014-08-31 13:33:55 -05:00
bors
08176a3561 auto merge of #16894 : alexcrichton/rust/issue-16872, r=huonw
It was previously asserted that each thread received at least one connection,
but this is not guaranteed to always be the case due to scheduling. This test
also deadlocked on failure due to a lingering reference to the sending half of
the channel, so that reference is now also eagerly dropped so the test can fail
properly if something bad happens.

Closes #16872
2014-08-31 17:15:52 +00:00
Joseph Crail
c5f66d8135 Fix whitespace and missing parentheses. 2014-08-31 11:53:16 -04:00