]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #40815 - estebank:issue-40006, r=GuillaumeGomez
Ariel Ben-Yehuda [Wed, 5 Apr 2017 23:01:06 +0000 (23:01 +0000)]
Rollup merge of #40815 - estebank:issue-40006, r=GuillaumeGomez

Identify missing item category in `impl`s

```rust
struct S;
impl S {
    pub hello_method(&self) {
        println!("Hello");
    }
}
fn main() { S.hello_method(); }
```

```rust
error: missing `fn` for method declaration
 --> file.rs:3:4
  |
3 |     pub hello_method(&self) {
  |        ^ missing `fn`
```

Fix #40006. r? @pnkfelix CC @jonathandturner @GuillaumeGomez

7 years agoRollup merge of #40709 - lifthrasiir:leaner-unicode-debug-str, r=alexcrichton
Ariel Ben-Yehuda [Wed, 5 Apr 2017 23:01:05 +0000 (23:01 +0000)]
Rollup merge of #40709 - lifthrasiir:leaner-unicode-debug-str, r=alexcrichton

Reduce a table used for `Debug` impl of `str`.

This commit shrinks the size of the aforementioned table from 2,102 bytes to 1,197 bytes. This is achieved by an observation that most `u16` entries are common in its upper byte. Specifically:

- `SINGLETONS` now uses two tables, one for (upper byte, lower count) and another for a series of lower bytes. For each upper byte given number of lower bytes are read and compared.

- `NORMAL` now uses a variable length format for the count of "true" codepoints and "false" codepoints (one byte with MSB unset, or two big-endian bytes with the first MSB set).

The code size and relative performance roughly remains same as this commit tries to optimize for both. The new table and algorithm has been verified for the equivalence to older ones.

In my x86-64 macOS laptop with `rustc 1.17.0-nightly (0aeb9c129 2017-03-15)`, `-C opt-level=3 -C lto` gives the following:

* The old routine compiles to 2,102 bytes of data and 416 bytes of code.
* The new routine compiles to 1,197 bytes of data and 448 bytes of code.

Counting a number of all printable Unicode scalar values (128,003, if you wonder) by filtering `0..0x110000` with `std::char::from_u32` and `is_printable` took 50±7ms for both. This can be surprising as the new routine *has* to do more calculations; this is partly explained by the fact that a linear search of `SINGLETONS` has been replaced by *two* linear searches for upper and lower bytes, which greatly reduces the iteration count.

7 years agoRollup merge of #40561 - arthurprs:hm-adapt2, r=pczarn
Ariel Ben-Yehuda [Wed, 5 Apr 2017 23:01:04 +0000 (23:01 +0000)]
Rollup merge of #40561 - arthurprs:hm-adapt2, r=pczarn

Simplify HashMap Bucket interface

> Simplify HashMap Bucket interface
>
> * Store capacity_mask instead of capacity
> * Move bucket index into RawBucket
> * Valid bucket index is now always within [0..table_capacity)
> * Simplify iterators by moving logic into RawBuckets
> * Clone RawTable using RawBucket
> * Make retain aware of the number of elements

The idea was to put idx in RawBucket instead of the other Bucket types and simplify next() and prev() as much as possible. The rest was a side-effect of that change, except maybe the last 2.

This change makes iteration and other next/prev() heavy operations noticeably faster. Clone is way faster.

```
➜  hashmap2 git:(adapt) ✗ cargo benchcmp pre:: adp:: bench.txt
 name                        pre:: ns/iter  adp:: ns/iter  diff ns/iter   diff %
 clone_10_000                74,364         39,736              -34,628  -46.57%
 grow_100_000                8,343,553      8,233,785          -109,768   -1.32%
 grow_10_000                 817,825        723,958             -93,867  -11.48%
 grow_big_value_100_000      18,418,979     17,906,186         -512,793   -2.78%
 grow_big_value_10_000       1,219,242      1,103,334          -115,908   -9.51%
 insert_1000                 74,546         58,343              -16,203  -21.74%
 insert_100_000              6,743,770      6,238,017          -505,753   -7.50%
 insert_10_000               798,079        719,123             -78,956   -9.89%
 insert_1_000_000            275,215,605    266,975,875      -8,239,730   -2.99%
 insert_int_bigvalue_10_000  1,517,387      1,419,838           -97,549   -6.43%
 insert_str_10_000           316,179        278,896             -37,283  -11.79%
 insert_string_10_000        770,927        747,449             -23,478   -3.05%
 iter_keys_100_000           386,099        333,104             -52,995  -13.73%
 iterate_100_000             387,320        355,707             -31,613   -8.16%
 lookup_100_000              206,757        193,063             -13,694   -6.62%
 lookup_100_000_unif         219,366        193,180             -26,186  -11.94%
 lookup_1_000_000            206,456        205,716                -740   -0.36%
 lookup_1_000_000_unif       659,934        629,659             -30,275   -4.59%
 lru_sim                     20,194,334     18,442,149       -1,752,185   -8.68%
 merge_shuffle               1,168,044      1,063,055          -104,989   -8.99%
```

Note 2: I may have messed up porting the diff, let's see what CI says.

7 years agoRollup merge of #40479 - sezaru:master, r=alexcrichton
Ariel Ben-Yehuda [Wed, 5 Apr 2017 23:01:03 +0000 (23:01 +0000)]
Rollup merge of #40479 - sezaru:master, r=alexcrichton

Fixes other targets rustlibs installation

When the user select more than one target to generate rustlibs for, rustbuild will only install the host one.

This patch fixes it, more info in https://github.com/rust-lang/rust/issues/39235#issuecomment-285878858

7 years agoAuto merge of #40348 - nrc:save-extern-fn, r=eddyb
bors [Wed, 5 Apr 2017 20:06:00 +0000 (20:06 +0000)]
Auto merge of #40348 - nrc:save-extern-fn, r=eddyb

Handle extern functions and statics in save-analysis

r? @eddyb

7 years agoAuto merge of #41086 - frewsxcv:rollup, r=frewsxcv
bors [Wed, 5 Apr 2017 16:47:45 +0000 (16:47 +0000)]
Auto merge of #41086 - frewsxcv:rollup, r=frewsxcv

Rollup of 19 pull requests

- Successful merges: #40608, #40870, #40949, #40977, #40981, #40988, #40992, #40997, #40999, #41007, #41014, #41019, #41035, #41043, #41049, #41062, #41066, #41076, #41085
- Failed merges:

7 years agoRollup merge of #41085 - nagisa:fix-output-properg, r=alexcrichton
Corey Farwell [Wed, 5 Apr 2017 16:44:40 +0000 (12:44 -0400)]
Rollup merge of #41085 - nagisa:fix-output-properg, r=alexcrichton

Properly adjust filenames when multiple emissions

Fixes #40993

Should backport just fine to beta but not sure if we want to do this since this is quite old stable regression.

7 years agoRollup merge of #41076 - alexcrichton:update-sccache, r=frewsxcv
Corey Farwell [Wed, 5 Apr 2017 16:44:39 +0000 (12:44 -0400)]
Rollup merge of #41076 - alexcrichton:update-sccache, r=frewsxcv

travis: Update sccache binaries

I've tracked down what I believe is the last spurious sccache failure on #40240
to behavior in mio (carllerche/mio#583), and this commit updates the binaries to
a version which has that fix incorporated.

7 years agoRollup merge of #41066 - steveklabnik:fix-links, r=frewsxcv
Corey Farwell [Wed, 5 Apr 2017 16:44:38 +0000 (12:44 -0400)]
Rollup merge of #41066 - steveklabnik:fix-links, r=frewsxcv

Fix links

part of https://github.com/rust-lang/rust/issues/40912

[]\n() is not actually a link.

r? @frewsxcv @GuillaumeGomez

7 years agoRollup merge of #41062 - estebank:private-field, r=arielb1
Corey Farwell [Wed, 5 Apr 2017 16:44:38 +0000 (12:44 -0400)]
Rollup merge of #41062 - estebank:private-field, r=arielb1

Do not recommend private fields called as method

```rust
error: no method named `dog_age` found for type `animal::Dog` in the current scope
  --> $DIR/private-field.rs:26:23
   |
26 |     let dog_age = dog.dog_age();
   |                       ^^^^^^^ private field, not a method
```
Fix #27654.

7 years agoRollup merge of #41049 - GuillaumeGomez:rustdoc-ordered-list, r=frewsxcv
Corey Farwell [Wed, 5 Apr 2017 16:44:36 +0000 (12:44 -0400)]
Rollup merge of #41049 - GuillaumeGomez:rustdoc-ordered-list, r=frewsxcv

Handle ordered lists as well

Part of #40912.

r? @rust-lang/docs

7 years agoRollup merge of #41043 - GuillaumeGomez:sup_balise, r=steveklabnik
Corey Farwell [Wed, 5 Apr 2017 16:44:36 +0000 (12:44 -0400)]
Rollup merge of #41043 - GuillaumeGomez:sup_balise, r=steveklabnik

Replace ^ with <sup> html balise

r? @steveklabnik

7 years agoRollup merge of #41035 - jmesmon:revert-bad-raw-fd-impls, r=aturon
Corey Farwell [Wed, 5 Apr 2017 16:44:35 +0000 (12:44 -0400)]
Rollup merge of #41035 - jmesmon:revert-bad-raw-fd-impls, r=aturon

Revert "Implement AsRawFd/IntoRawFd for RawFd"

This reverts commit 2cf686f2cdd6446a3cd47df0305ead40fabe85df (#40842)

RawFd is a type alias for c_int, which is itself a type alias for i32.
As a result, adding AsRawFd and IntoRawFd impls for RawFd actually adds
them for i32.

As a result, the reverted commit makes this valid:

```
use std::os::unix::io::AsRawFd;

fn arf<T: AsRawFd>(_: T) {}

fn main() {
    arf(32i32)
}
```

Implimenting AsRawFd and IntoRawFd for i32 breaks the promises of both
those traits that their methods return a valid RawFd.

r? @aturon
cc @Mic92 @kamalmarhubi

7 years agoRollup merge of #41019 - mandeep:fix-vec-swapremove-docs, r=BurntSushi
Corey Farwell [Wed, 5 Apr 2017 16:44:33 +0000 (12:44 -0400)]
Rollup merge of #41019 - mandeep:fix-vec-swapremove-docs, r=BurntSushi

Fixed typo in doc comments for swap_remove

While reading the Vec docs, I came across the docs for swap_remove. I believe there is a typo in the comment and ```return``` should be ```returns```. This PR fixes this issue.

I also feel that the entire doc comment is a bit of a run-on and could be changed to something along the lines of ```Removes an element from anywhere in the vector and returns it. The vector is mutated and the removed element is replaced by the last element of the vector. ```

Thoughts?

7 years agoRollup merge of #41014 - SimonSapin:patch-6, r=frewsxcv
Corey Farwell [Wed, 5 Apr 2017 16:44:33 +0000 (12:44 -0400)]
Rollup merge of #41014 - SimonSapin:patch-6, r=frewsxcv

std::thread docs: fix link to current()

7 years agoRollup merge of #41007 - pgerber:dir_builder, r=frewsxcv
Corey Farwell [Wed, 5 Apr 2017 16:44:32 +0000 (12:44 -0400)]
Rollup merge of #41007 - pgerber:dir_builder, r=frewsxcv

Improve documentation for `std::fs::DirBuilder`

7 years agoRollup merge of #40999 - irfanhudda:improve-option-docs, r=steveklabnik
Corey Farwell [Wed, 5 Apr 2017 16:44:31 +0000 (12:44 -0400)]
Rollup merge of #40999 - irfanhudda:improve-option-docs, r=steveklabnik

Improve option API docs

Associated Issue: #29366

Improve `option` API docs for
* `IntoIter` struct
* `Iter` struct
* `IterMut` struct

r? @steveklabnik

7 years agoRollup merge of #40997 - donniebishop:from_utf8_linking, r=steveklabnik
Corey Farwell [Wed, 5 Apr 2017 16:44:30 +0000 (12:44 -0400)]
Rollup merge of #40997 - donniebishop:from_utf8_linking, r=steveklabnik

Added links to types in from_utf8 description

References #29375. Link to types mentioned in the documentation for `from_utf8` (`str`, `&[u8`], etc). Paragraphs were reformatted to keep any one line from being excessively long, but are otherwise unchanged.

7 years agoRollup merge of #40992 - donniebishop:utf8err_linking, r=alexcrichton
Corey Farwell [Wed, 5 Apr 2017 16:44:29 +0000 (12:44 -0400)]
Rollup merge of #40992 - donniebishop:utf8err_linking, r=alexcrichton

Added links to from_utf8 methods in Utf8Error

Referencing  #29375. Linked the `from_utf8` methods for both `String` and `str` in the description. Also linked the `u8` to its documentation

7 years agoRollup merge of #40988 - eugene-bulkin:ascii-docs, r=frewsxcv
Corey Farwell [Wed, 5 Apr 2017 16:44:28 +0000 (12:44 -0400)]
Rollup merge of #40988 - eugene-bulkin:ascii-docs, r=frewsxcv

API Docs: ascii

Add/update docs for the `ascii` module per #29341.

r? @steveklabnik

7 years agoRollup merge of #40981 - Technius:master, r=steveklabnik
Corey Farwell [Wed, 5 Apr 2017 16:44:27 +0000 (12:44 -0400)]
Rollup merge of #40981 - Technius:master, r=steveklabnik

Add links and some examples to std::sync::mpsc docs

Addresses part of #29377
r? @steveklabnik

I took a stab at adding links to the `std::sync::mpsc` docs, and I also wrote a few examples.

Edit: Whoops, typed in `?r` instead of `r?`.

7 years agoRollup merge of #40977 - projektir:BarrierWaitResult_doc, r=steveklabnik
Corey Farwell [Wed, 5 Apr 2017 16:44:26 +0000 (12:44 -0400)]
Rollup merge of #40977 - projektir:BarrierWaitResult_doc, r=steveklabnik

Updating the description for BarrierWaitResult #29377

Referencing `Barrier`, removing reference to `is_leader`.

7 years agoRollup merge of #40949 - stjepang:fix-vecdeque-docs, r=frewsxcv
Corey Farwell [Wed, 5 Apr 2017 16:44:25 +0000 (12:44 -0400)]
Rollup merge of #40949 - stjepang:fix-vecdeque-docs, r=frewsxcv

Improve some docs for VecDeque

r? @GuillaumeGomez

7 years agoRollup merge of #40870 - alexcrichton:stabilize-windows-subsystem, r=aturon
Corey Farwell [Wed, 5 Apr 2017 16:44:25 +0000 (12:44 -0400)]
Rollup merge of #40870 - alexcrichton:stabilize-windows-subsystem, r=aturon

rustc: Stabilize the `#![windows_subsystem]` attribute

This commit stabilizes the `#![windows_subsystem]` attribute which is a
conservative exposure of the `/SUBSYSTEM` linker flag on Widnows platforms. This
is useful for creating applications as well as console programs.

Closes #37499

7 years agoRollup merge of #40608 - GuillaumeGomez:mutex-doc-inconsistency, r=steveklabnik
Corey Farwell [Wed, 5 Apr 2017 16:44:24 +0000 (12:44 -0400)]
Rollup merge of #40608 - GuillaumeGomez:mutex-doc-inconsistency, r=steveklabnik

Fix mutex's docs inconsistency

Fixes #40176.

r? @steveklabnik
cc @rust-lang/docs

7 years agoReduce a table used for `Debug` impl of `str`.
Kang Seonghoon [Tue, 21 Mar 2017 18:27:06 +0000 (03:27 +0900)]
Reduce a table used for `Debug` impl of `str`.

This commit shrinks the size of the aforementioned table from
2,102 bytes to 1,197 bytes. This is achieved by an observation that
most u16 entries are common in its upper byte. Specifically:

- SINGLETONS now uses two tables, one for (upper byte, lower count)
  and another for a series of lower bytes. For each upper byte given
  number of lower bytes are read and compared.

- NORMAL now uses a variable length format for the count of "true"
  codepoints and "false" codepoints (one byte with MSB unset, or
  two big-endian bytes with the first MSB set).

The code size and relative performance roughly remains same as this
commit tries to optimize for both. The new table and algorithm has
been verified for the equivalence to older ones.

7 years agoProperly adjust filenames when multiple emissions
Simonas Kazlauskas [Wed, 5 Apr 2017 15:59:16 +0000 (18:59 +0300)]
Properly adjust filenames when multiple emissions

Fixes #40993

7 years agotidy clean and small text fix
steveklabnik [Wed, 5 Apr 2017 15:58:53 +0000 (11:58 -0400)]
tidy clean and small text fix

7 years agoAuto merge of #40811 - estebank:issue-32540, r=jonathandturner
bors [Wed, 5 Apr 2017 09:23:27 +0000 (09:23 +0000)]
Auto merge of #40811 - estebank:issue-32540, r=jonathandturner

Point at last valid token on failed `expect_one_of`

```rust
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)`
  --> $DIR/token-error-correct-3.rs:29:9
   |
25 |         foo()
   |              - expected one of `.`, `;`, `?`, `}`, or an operator after this
...
29 |     } else {
   |     ^ unexpected token
```

Fix #32540.

7 years agoFixes other targets rustlibs installation
GitLab [Mon, 13 Mar 2017 17:44:54 +0000 (14:44 -0300)]
Fixes other targets rustlibs installation

When the user select more than one target to generate rustlibs for, rustbuild will only install the host one.

This patch fixes it, more info in https://github.com/rust-lang/rust/issues/39235#issuecomment-285878858

7 years agotravis: Update sccache binaries
Alex Crichton [Tue, 4 Apr 2017 22:55:23 +0000 (15:55 -0700)]
travis: Update sccache binaries

I've tracked down what I believe is the last spurious sccache failure on #40240
to behavior in mio (carllerche/mio#583), and this commit updates the binaries to
a version which has that fix incorporated.

7 years agoSimplify HashMap Bucket interface
arthurprs [Wed, 15 Mar 2017 22:26:27 +0000 (23:26 +0100)]
Simplify HashMap Bucket interface

* Store capacity_mask instead of capacity
* Move bucket index into RawBucket
* Bucket index is now always within [0..table_capacity)
* Clone RawTable using RawBucket
* Simplify iterators by moving logic into RawBuckets
* Make retain aware of the number of elements

7 years agoFix links
steveklabnik [Tue, 4 Apr 2017 19:39:44 +0000 (15:39 -0400)]
Fix links

part of https://github.com/rust-lang/rust/issues/40912

[]\n() is not actually a link.

7 years agoAuto merge of #41059 - TimNN:rollup, r=TimNN
bors [Tue, 4 Apr 2017 17:23:32 +0000 (17:23 +0000)]
Auto merge of #41059 - TimNN:rollup, r=TimNN

Rollup of 1 pull requests

- Successful merges: #40998
- Failed merges: #41045

7 years agoupdate image name for DEPLOY_ALT
Tim Neumann [Tue, 4 Apr 2017 16:14:14 +0000 (18:14 +0200)]
update image name for DEPLOY_ALT

7 years agoDo not recommend private fields called as method
Esteban Küber [Tue, 4 Apr 2017 15:58:27 +0000 (08:58 -0700)]
Do not recommend private fields called as method

7 years agoMerge branch 'master' into issue-32540
Esteban Küber [Tue, 4 Apr 2017 15:10:22 +0000 (08:10 -0700)]
Merge branch 'master' into issue-32540

7 years agofix rollup
Tim Neumann [Tue, 4 Apr 2017 13:46:48 +0000 (15:46 +0200)]
fix rollup

7 years agoMerge remote-tracking branch 'hub/centos5-vault' into rollup
Tim Neumann [Tue, 4 Apr 2017 13:43:07 +0000 (15:43 +0200)]
Merge remote-tracking branch 'hub/centos5-vault' into rollup

7 years agoRollup merge of #40998 - alexcrichton:split-dist, r=TimNN
Tim Neumann [Tue, 4 Apr 2017 13:41:17 +0000 (15:41 +0200)]
Rollup merge of #40998 - alexcrichton:split-dist, r=TimNN

travis: Split all dist builders in two

Previously we would use one builder on Travis to produce two sets of host
compilers for two different targets. Unfortunately though we've recently
increased how much we're building for each target so this is starting to take
unnecessarily long (#40804). This commit splits the dist builders in two by
ensuring that we only dist one target on each builder, which should take a much
shorter amount of time. This should also unblock other work such as landing the
RLS (#40584).

7 years agorebased
Nick Cameron [Wed, 15 Mar 2017 21:43:11 +0000 (10:43 +1300)]
rebased

7 years agosave-analysis: index extern blocks
Nick Cameron [Wed, 8 Mar 2017 05:04:30 +0000 (18:04 +1300)]
save-analysis: index extern blocks

7 years agosave-analysis: only index path references once
Nick Cameron [Wed, 8 Mar 2017 03:30:31 +0000 (16:30 +1300)]
save-analysis: only index path references once

7 years agoFix styling issues
Bryan Tan [Mon, 3 Apr 2017 23:09:19 +0000 (16:09 -0700)]
Fix styling issues

7 years agoHandle ordered lists as well
Guillaume Gomez [Mon, 3 Apr 2017 22:24:08 +0000 (00:24 +0200)]
Handle ordered lists as well

7 years agouse fixed ip for vault.centos.org until updates have propagated to all mirrors
Tim Neumann [Mon, 3 Apr 2017 20:51:06 +0000 (22:51 +0200)]
use fixed ip for vault.centos.org until updates have propagated to all mirrors

7 years agoRemoved trailing whitespace on line 682
mandeep [Mon, 3 Apr 2017 20:48:12 +0000 (15:48 -0500)]
Removed trailing whitespace on line 682

7 years agoswitch to vault.centos.org
Tim Neumann [Mon, 3 Apr 2017 20:14:45 +0000 (22:14 +0200)]
switch to vault.centos.org

7 years agotravis: Split all dist builders in two
Alex Crichton [Sat, 1 Apr 2017 14:18:43 +0000 (07:18 -0700)]
travis: Split all dist builders in two

Previously we would use one builder on Travis to produce two sets of host
compilers for two different targets. Unfortunately though we've recently
increased how much we're building for each target so this is starting to take
unnecessarily long (#40804). This commit splits the dist builders in two by
ensuring that we only dist one target on each builder, which should take a much
shorter amount of time. This should also unblock other work such as landing the
RLS (#40584).

7 years agoReplace ^ with <sup> html balise
Guillaume Gomez [Mon, 3 Apr 2017 19:17:47 +0000 (21:17 +0200)]
Replace ^ with <sup> html balise

7 years agoFix mutex's docs inconsistency
Guillaume Gomez [Fri, 17 Mar 2017 17:32:17 +0000 (18:32 +0100)]
Fix mutex's docs inconsistency

7 years agoRefactored swap_remove doc comment upon discussing with BurntSushi and steveklabnik
mandeep [Mon, 3 Apr 2017 14:51:34 +0000 (09:51 -0500)]
Refactored swap_remove doc comment upon discussing with BurntSushi and steveklabnik

7 years agoRevert "Implement AsRawFd/IntoRawFd for RawFd"
Cody P Schafer [Mon, 3 Apr 2017 14:14:10 +0000 (10:14 -0400)]
Revert "Implement AsRawFd/IntoRawFd for RawFd"

This reverts commit 2cf686f2cdd6446a3cd47df0305ead40fabe85df (#40842)

RawFd is a type alias for c_int, which is itself a type alias for i32.
As a result, adding AsRawFd and IntoRawFd impls for RawFd actually adds
them for i32.

As a result, the reverted commit makes this valid:

```
use std::os::unix::io::AsRawFd;

fn arf<T: AsRawFd>(_: T) {}

fn main() {
    arf(32i32)
}
```

Implimenting AsRawFd and IntoRawFd for i32 breaks the promises of both
those traits that their methods return a valid RawFd.

r? @aturon
cc @Mic92 @kamalmarhubi

7 years agoMerge branch 'master' into issue-40006
Esteban Küber [Mon, 3 Apr 2017 11:58:48 +0000 (04:58 -0700)]
Merge branch 'master' into issue-40006

7 years agoAuto merge of #40915 - nrc:save-assoc, r=eddyb
bors [Mon, 3 Apr 2017 03:26:09 +0000 (03:26 +0000)]
Auto merge of #40915 - nrc:save-assoc, r=eddyb

save-analysis: track associated types

r? @eddyb

7 years agoAuto merge of #40919 - GuillaumeGomez:fix-new-rustdoc, r=frewsxcv,steveklabnik
bors [Sun, 2 Apr 2017 18:16:09 +0000 (18:16 +0000)]
Auto merge of #40919 - GuillaumeGomez:fix-new-rustdoc, r=frewsxcv,steveklabnik

Add support for image, rules and footnotes

Part of #40912.

r? @rust-lang/docs

PS: the footnotes are waiting for https://github.com/google/pulldown-cmark/pull/21 to be merged to be fully working.

7 years agoFixed typo in doc comments for swap_remove
mandeep [Sun, 2 Apr 2017 16:21:05 +0000 (11:21 -0500)]
Fixed typo in doc comments for swap_remove

7 years agostd::thread docs: fix link to current()
Simon Sapin [Sun, 2 Apr 2017 10:03:54 +0000 (12:03 +0200)]
std::thread docs: fix link to current()

7 years agoImprove documentation for `std::fs::DirBuilder`
Peter Gerber [Sat, 1 Apr 2017 13:58:37 +0000 (15:58 +0200)]
Improve documentation for `std::fs::DirBuilder`

7 years agoMinor changes to core::option docs
Irfan Hudda [Sun, 2 Apr 2017 00:40:34 +0000 (06:10 +0530)]
Minor changes to core::option docs

7 years agoImprove docs of core::option::Iter
Irfan Hudda [Sat, 1 Apr 2017 16:47:48 +0000 (22:17 +0530)]
Improve docs of core::option::Iter

7 years agoImprove docs of core::option::IterMut
Irfan Hudda [Sat, 1 Apr 2017 16:39:10 +0000 (22:09 +0530)]
Improve docs of core::option::IterMut

7 years agoImprove docs of core::option::IntoIter
Irfan Hudda [Sat, 1 Apr 2017 16:28:30 +0000 (21:58 +0530)]
Improve docs of core::option::IntoIter

7 years agoAdded links to types in from_utf8 description
Donnie Bishop [Sat, 1 Apr 2017 13:56:40 +0000 (09:56 -0400)]
Added links to types in from_utf8 description

7 years agorustc: Stabilize the `#![windows_subsystem]` attribute
Alex Crichton [Mon, 20 Mar 2017 19:49:13 +0000 (12:49 -0700)]
rustc: Stabilize the `#![windows_subsystem]` attribute

This commit stabilizes the `#![windows_subsystem]` attribute which is a
conservative exposure of the `/SUBSYSTEM` linker flag on Widnows platforms. This
is useful for creating applications as well as console programs.

Closes #37499

7 years agoAdd more std::ascii module-level docs.
Eugene Bulkin [Sat, 1 Apr 2017 07:47:58 +0000 (00:47 -0700)]
Add more std::ascii module-level docs.

7 years agoClean up std::ascii sub-level docs.
Eugene Bulkin [Sat, 1 Apr 2017 07:07:55 +0000 (00:07 -0700)]
Clean up std::ascii sub-level docs.

* Change `utf8` variable names to `non_ascii` to be more clear, since
ASCII and UTF-8 are compatible.

* Fix `EscapeDefault` struct description to follow the typical iterator
method format with a link to the generating function.

* Add more `escape_default` examples to cover every case mentioned in
the function description itself.

7 years agoForce footnote references to be sorted by id
Guillaume Gomez [Sat, 1 Apr 2017 06:31:37 +0000 (00:31 -0600)]
Force footnote references to be sorted by id

7 years agoFix warnings in examples
Bryan Tan [Sat, 1 Apr 2017 06:22:59 +0000 (23:22 -0700)]
Fix warnings in examples

7 years agoAuto merge of #40967 - alexcrichton:old-osx, r=brson
bors [Sat, 1 Apr 2017 05:56:08 +0000 (05:56 +0000)]
Auto merge of #40967 - alexcrichton:old-osx, r=brson

travis: Compile OSX releases with Xcode 7

Unfortunately what we're using right now, Xcode 8.2, cannot compile LLVM for OSX
10.7. We've done this historically and Gecko would like to maintain this
compabitiliby. This commit moves our release builders for OSX to using Xcode 7
which can compile LLVM for 10.7.

The builders running tests continue to use Xcode 8.2, however, because the LLDB
version with Xcode 7, 350, is blacklisted in running our LLDB tests. To continue
running LLDB tests we'll stick with Xcode 8.2.

7 years agoAdded links to from_utf8 methods in Utf8Error
Donnie Bishop [Sat, 1 Apr 2017 03:22:22 +0000 (23:22 -0400)]
Added links to from_utf8 methods in Utf8Error

7 years agoFix broken links to std::iter::Iterator::next
Bryan Tan [Sat, 1 Apr 2017 01:51:37 +0000 (18:51 -0700)]
Fix broken links to std::iter::Iterator::next

7 years agoChange wording for push_front
Stjepan Glavina [Sat, 1 Apr 2017 00:47:37 +0000 (02:47 +0200)]
Change wording for push_front

7 years agoAdd links and examples to std::sync::mpsc docs (#29377)
Bryan Tan [Sat, 1 Apr 2017 00:05:45 +0000 (17:05 -0700)]
Add links and examples to std::sync::mpsc docs (#29377)

This change adds links to to `Receiver`, `Iter`, `TryIter`, `IntoIter`,
`Sender`, `SyncSender`, `SendError`, `RecvError`, `TryRecvError`,
`RecvTimeoutError`, `TrySendError`, `Sender::send`, `SyncSender::send`,
`SyncSender::try_send`, `Receiver::recv`, `Receiver::recv_timeout`,
`Receiver::iter`, and `Receiver::try_iter`.

Examples added to `Receiver`, `Sender`, `Receiver::iter`.

7 years agoAuto merge of #40972 - frewsxcv:rollup, r=frewsxcv
bors [Fri, 31 Mar 2017 23:23:49 +0000 (23:23 +0000)]
Auto merge of #40972 - frewsxcv:rollup, r=frewsxcv

Rollup of 6 pull requests

- Successful merges: #40703, #40728, #40763, #40871, #40935, #40947
- Failed merges:

7 years agoUpdating the description for BarrierWaitResult #29377
projektir [Fri, 31 Mar 2017 22:58:32 +0000 (18:58 -0400)]
Updating the description for BarrierWaitResult #29377

7 years agoRollup merge of #40947 - stjepang:test-sort-random-cmp, r=alexcrichton
Corey Farwell [Fri, 31 Mar 2017 20:48:29 +0000 (16:48 -0400)]
Rollup merge of #40947 - stjepang:test-sort-random-cmp, r=alexcrichton

Test sort algorithms using a random cmp function

This ensures that sorting using a broken comparison function doesn't panic nor fail in some other way (especially not segfault).

r? @alexcrichton

7 years agoRollup merge of #40935 - donniebishop:str_boilerplate_docs, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 20:48:28 +0000 (16:48 -0400)]
Rollup merge of #40935 - donniebishop:str_boilerplate_docs, r=steveklabnik

Modify str Structs descriptions

References #29375. Modified descriptions of multiple structs to be more in line with structs found under [`std::iter`](https://doc.rust-lang.org/std/iter/#structs), such as [`Chain`](https://doc.rust-lang.org/std/iter/struct.Chain.html) and [`Enumerate`](https://doc.rust-lang.org/std/iter/struct.Enumerate.html)

7 years agoRollup merge of #40871 - projektir:atomic_links, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 20:48:27 +0000 (16:48 -0400)]
Rollup merge of #40871 - projektir:atomic_links, r=steveklabnik

Adding links for Atomics docs #29377

r? @steveklabnik

This should be good for `std::sync::atomic`. The other pages still need more (examples, etc.).

7 years agoRollup merge of #40763 - pirate:patch-2, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 20:48:26 +0000 (16:48 -0400)]
Rollup merge of #40763 - pirate:patch-2, r=steveklabnik

Add helpful hint in io docs about how ? is not allowed in main()

This is my effort to help alleviate the confusion caused by the error message:
```rust
error[E0277]: the trait bound `(): std::ops::Carrier` is not satisfied
  --> hello_world.rs:72:5
   |
72 |     io::stdin().read_line(&mut d_input)?;
   |     ------------------------------------
   |     |
   |     the trait `std::ops::Carrier` is not implemented for `()`
   |     in this macro invocation
   |
   = note: required by `std::ops::Carrier::from_error`

error: aborting due to previous error
```
This has been discussed at length in https://github.com/rust-lang/rust/issues/35946, but I figured it would be helpful to mention in the docs.
Reading user input is one of the first things beginners will look up in the docs, so my thinking was they'd see this warning here and not have to deal with the [tricky error message](https://blog.rust-lang.org/2017/03/02/lang-ergonomics.html).

If you think this isn't the right place to put this in the docs, that's understandable, I'm open to suggestions for putting it elsewhere or removing it entirely.

7 years agoRollup merge of #40728 - topecongiro:stabilize, r=arielb1
Corey Farwell [Fri, 31 Mar 2017 20:48:25 +0000 (16:48 -0400)]
Rollup merge of #40728 - topecongiro:stabilize, r=arielb1

Make overlapping_inherent_impls lint a hard error

Closes #36889.

7 years agoRollup merge of #40703 - GuillaumeGomez:pointer-docs, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 20:48:24 +0000 (16:48 -0400)]
Rollup merge of #40703 - GuillaumeGomez:pointer-docs, r=steveklabnik

Add missing urls in ptr docs

r? @rust-lang/docs

7 years agotravis: Compile OSX releases with Xcode 7
Alex Crichton [Fri, 31 Mar 2017 18:04:25 +0000 (11:04 -0700)]
travis: Compile OSX releases with Xcode 7

Unfortunately what we're using right now, Xcode 8.2, cannot compile LLVM for OSX
10.7. We've done this historically and Gecko would like to maintain this
compabitiliby. This commit moves our release builders for OSX to using Xcode 7
which can compile LLVM for 10.7.

The builders running tests continue to use Xcode 8.2, however, because the LLDB
version with Xcode 7, 350, is blacklisted in running our LLDB tests. To continue
running LLDB tests we'll stick with Xcode 8.2.

7 years agoAdd end whitespace ignore flag for tidy
Guillaume Gomez [Fri, 31 Mar 2017 18:08:31 +0000 (12:08 -0600)]
Add end whitespace ignore flag for tidy

7 years agoFix hard break issue
Guillaume Gomez [Fri, 31 Mar 2017 17:02:46 +0000 (11:02 -0600)]
Fix hard break issue

7 years agoAuto merge of #40950 - frewsxcv:rollup, r=frewsxcv
bors [Fri, 31 Mar 2017 16:04:18 +0000 (16:04 +0000)]
Auto merge of #40950 - frewsxcv:rollup, r=frewsxcv

Rollup of 10 pull requests

- Successful merges: #40694, #40842, #40869, #40888, #40898, #40904, #40925, #40928, #40929, #40934
- Failed merges:

7 years agoRollup merge of #40934 - SamWhited:improve_write_writeln_docs, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 15:43:39 +0000 (11:43 -0400)]
Rollup merge of #40934 - SamWhited:improve_write_writeln_docs, r=steveklabnik

Improve the docs for the write and writeln macros

This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner (I hope; feedback would be welcome).

Updates #29329, #29381

7 years agoRollup merge of #40929 - bluss:full-reverse, r=alexcrichton
Corey Farwell [Fri, 31 Mar 2017 15:43:38 +0000 (11:43 -0400)]
Rollup merge of #40929 - bluss:full-reverse, r=alexcrichton

Implement all PartialOrd methods for Reverse

When making a forwarding wrapper we must in general forward all methods,
so that we use the type's own `lt` for example instead of the default.

Example important case: f32's partial_cmp does several operations but
its lt is a primitive.

Follow up on #40720

7 years agoRollup merge of #40928 - GAJaloyan:patch-2, r=eddyb
Corey Farwell [Fri, 31 Mar 2017 15:43:37 +0000 (11:43 -0400)]
Rollup merge of #40928 - GAJaloyan:patch-2, r=eddyb

adding debug in consume_body function

When in debug_assertions=true mode, the function consume_body lacks some debug output, which makes it harder to follow the control flow. This commit adds this needed debug.

7 years agoRollup merge of #40925 - DaseinPhaos:patch-5, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 15:43:36 +0000 (11:43 -0400)]
Rollup merge of #40925 - DaseinPhaos:patch-5, r=steveklabnik

Add missing link in unstable-book

add link to specialization's tracking issue

7 years agoRollup merge of #40904 - rap2hpoutre:patch-1, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 15:43:35 +0000 (11:43 -0400)]
Rollup merge of #40904 - rap2hpoutre:patch-1, r=steveklabnik

Add example to std::process::abort

This is a first step in order to complete this issue: https://github.com/rust-lang/rust/issues/29370
I submitted this PR with the help of @steveklabnik More info here: https://github.com/rust-lang/rust/issues/29370#issuecomment-290089330

It's my first PR on Rust, I'm learning how to contribute: Should I ping someone? I will post another PR with a more complicated example soon, I prefer send it separately (cause maybe I made some mistakes).

7 years agoRollup merge of #40898 - MaloJaffre:remove-unused-feature, r=alexcrichton
Corey Farwell [Fri, 31 Mar 2017 15:43:34 +0000 (11:43 -0400)]
Rollup merge of #40898 - MaloJaffre:remove-unused-feature, r=alexcrichton

Remove unused feature from error index generator

Remove feature `rustdoc`.

7 years agoRollup merge of #40888 - wesleywiser:rustdoc_src_sidebar, r=GuillaumeGomez
Corey Farwell [Fri, 31 Mar 2017 15:43:33 +0000 (11:43 -0400)]
Rollup merge of #40888 - wesleywiser:rustdoc_src_sidebar, r=GuillaumeGomez

Make the rustdoc sidebar white on `src` pages

Fixes #40724

7 years agoRollup merge of #40869 - ctjhoa:master, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 15:43:32 +0000 (11:43 -0400)]
Rollup merge of #40869 - ctjhoa:master, r=steveklabnik

Improve os::linux documentation (#29367)

Improve `os::linux` documentation according to #29367

r? @steveklabnik

7 years agoRollup merge of #40842 - Mic92:RawFd, r=aturon
Corey Farwell [Fri, 31 Mar 2017 15:43:31 +0000 (11:43 -0400)]
Rollup merge of #40842 - Mic92:RawFd, r=aturon

Implement AsRawFd/IntoRawFd for RawFd

This is useful to build os abstraction like the nix crate does.
It allows to define functions, which accepts generic arguments
of data structures convertible to RawFd, including RawFd itself.
For example:

```
fn write<FD: AsRawFd>(fd: FD, buf: &[u8]) -> Result<usize>
write(file, buf);
```
instead of:
```
fn write(fd: RawFd, buf: &[u8]) -> Result<usize>
write(file.as_raw_fd(), buf);
```

cc @kamalmarhubi

7 years agoRollup merge of #40694 - frewsxcv:unstable-book-checker, r=steveklabnik
Corey Farwell [Fri, 31 Mar 2017 15:43:30 +0000 (11:43 -0400)]
Rollup merge of #40694 - frewsxcv:unstable-book-checker, r=steveklabnik

Sync all unstable features with Unstable Book; add tidy lint.

Add a tidy lint that checks for...

* Unstable Book sections with no corresponding SUMMARY.md links
* unstable features that don't have Unstable Book sections
* Unstable Book sections that don't have corresponding unstable features

7 years agoSync all unstable features with Unstable Book; add tidy lint.
Corey Farwell [Sun, 19 Mar 2017 14:45:05 +0000 (10:45 -0400)]
Sync all unstable features with Unstable Book; add tidy lint.

Add a tidy lint that checks for...

* Unstable Book sections with no corresponding SUMMARY.md links
* unstable features that don't have Unstable Book sections
* Unstable Book sections that don't have corresponding unstable features

7 years agoImprove some docs for VecDeque
Stjepan Glavina [Fri, 31 Mar 2017 15:12:47 +0000 (17:12 +0200)]
Improve some docs for VecDeque

7 years agoTest sort algorithms using a random cmp function
Stjepan Glavina [Fri, 31 Mar 2017 14:59:01 +0000 (16:59 +0200)]
Test sort algorithms using a random cmp function

7 years agoAuto merge of #40737 - nagisa:safe-slicing-strs, r=BurntSushi
bors [Fri, 31 Mar 2017 11:13:20 +0000 (11:13 +0000)]
Auto merge of #40737 - nagisa:safe-slicing-strs, r=BurntSushi

Checked slicing for strings

cc https://github.com/rust-lang/rust/issues/39932