Commit Graph

32174 Commits

Author SHA1 Message Date
Alex Crichton
2ec7bb8756 native: Remove a bogus assert in net::read
This assert was likely inherited from some point, but it's not quite valid as a
no-timeout read may enter this loop, but data could be stolen by any other read
after the socket is deemed readable.

I saw this fail in a recent bors run where the assertion was tripped.
2014-09-02 08:21:51 -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
Julian Orth
d34992ecba Add unwrap method to MoveItems 2014-08-31 17:27:49 +02:00
bors
27e8d5bca7 auto merge of #16788 : Manishearth/rust/raw-ptr-syntax-ty, r=huonw
@huonw , r? :)

#16781
2014-08-31 12:50:55 +00:00
bors
db47aa5bdf auto merge of #16895 : alexcrichton/rust/rollup, r=alexcrichton
Let's try this again!
2014-08-31 08:26:30 +00:00
Jorge Aparicio
417e4b41bb &mut [T] now implements Collection. Fixes #16896 2014-08-31 02:28:37 -05:00
Alex Crichton
33029c5ddd rollup merge of #16881 : cmr/guide-typo 2014-08-30 23:49:01 -07:00
Andrew Dunham
5bb6196378 Address review comments, add tests 2014-08-30 23:48:31 -07:00
Alex Crichton
56a029f145 rollup merge of #16852 : steveklabnik/desugar_destructure 2014-08-30 23:48:11 -07:00
Alex Crichton
963861fa40 rollup merge of #16849 : nhowell/patch-1 2014-08-30 23:48:05 -07:00
Alex Crichton
daefa70f99 rollup merge of #16846 : treeman/debug-doc 2014-08-30 23:47:53 -07:00
Alex Crichton
f584392ec9 rollup merge of #16842 : zsiciarz/master 2014-08-30 23:47:38 -07:00
Alex Crichton
1bd0df3fbb rollup merge of #16840 : huonw/feature-has-added 2014-08-30 23:47:33 -07:00
Alex Crichton
d1a5b277a1 rollup merge of #16839 : treeman/issue-15358 2014-08-30 23:47:23 -07:00
Alex Crichton
0bce667249 rollup merge of #16835 : michaelsproul/doc-slice-failure 2014-08-30 23:47:17 -07:00
Alex Crichton
89d1c9c48c rollup merge of #16833 : SebastianZaha/fix-guide-typo 2014-08-30 23:47:12 -07:00
Alex Crichton
c50fffaa9a rollup merge of #16832 : SebastianZaha/fix-inconsistent-version-numbering 2014-08-30 23:47:07 -07:00
Alex Crichton
8acceddb16 rollup merge of #16830 : cgaebel/docfix 2014-08-30 23:47:03 -07:00
Alex Crichton
fe848fcd3b rollup merge of #16828 : steveklabnik/more_pointer_guide 2014-08-30 23:46:46 -07:00
Alex Crichton
c6fd2d31ee rollup merge of #16807 : nham/guide_added_ownership_rule 2014-08-30 23:46:38 -07:00
Alex Crichton
f7f8b20961 rollup merge of #16780 : mdinger/marker_types 2014-08-30 23:46:19 -07:00