Commit Graph

52444 Commits

Author SHA1 Message Date
Tobias Bucher
c29585ca5b Add a note about side effects for "peekable" iterators 2016-04-16 01:00:18 +02:00
bors
576229fea0 Auto merge of #33005 - Manishearth:rollup, r=Manishearth
Rollup of 11 pull requests

- Successful merges: #32923, #32926, #32929, #32931, #32935, #32945, #32946, #32964, #32970, #32973, #32997
- Failed merges:
2016-04-15 14:51:16 -07:00
Andrey Tonkih
faeba73530 collections: add append and extend specialization for binary heap 2016-04-16 00:38:59 +03:00
pravic
9da67dae52 Describe possible keys of the -L rustc option. 2016-04-15 23:55:42 +03:00
Sander Maijers
2ef88c982a grammar: fix
Reading this, one item stood out a bit. Small improvements here.

. ‘Compile-time’ is not a noun, ‘compilation time’ was meant;
. Mathematical formulas are best not rendered as code;
. Use the same tense as in other items.
2016-04-15 22:33:50 +02:00
Michael Howell
63b508006d Do not use "bind" to refer to referencing and to variable binding. 2016-04-15 13:06:09 -07:00
Manish Goregaokar
e563359396
Rollup merge of #32997 - alexcrichton:fix-alloc-system-how-did-this-land, r=nagisa
alloc_system: Handle failure properly

The Unix implementation was incorrectly handling failure for reallocation of
over-aligned types by not checking for NULL.

Closes #32993
2016-04-16 01:18:14 +05:30
Manish Goregaokar
eba80558d7
Rollup merge of #32973 - kindlychung:patch-1, r=steveklabnik
remove "#" symbols to make the code compile
2016-04-16 01:18:12 +05:30
Manish Goregaokar
00d4ac32c5
Rollup merge of #32970 - taralx:patch-2, r=alexcrichton
Accommodate the case where dup lang items are entirely external.

Fixes #32961
2016-04-16 01:18:11 +05:30
Manish Goregaokar
9873771187
Rollup merge of #32964 - tshepang:comma, r=GuillaumeGomez
doc: add missing comma
2016-04-16 01:18:10 +05:30
Manish Goregaokar
5bdbf8ef46
Rollup merge of #32946 - eddyb:issue-32783, r=dotdash
trans: always register an item's symbol, even if duplicated.

Fixes #32783 which was introduced by not always registering item symbols in #32742.
2016-04-16 01:18:08 +05:30
Manish Goregaokar
90c8d81ee4
Rollup merge of #32945 - durka:rfc1494, r=pnkfelix
implement RFC amendment 1494

Adds `:block` to the follow set for `:ty` and `:path`. See rust-lang/rfcs#1494.
2016-04-16 01:18:07 +05:30
Manish Goregaokar
fbbe85c6ba
Rollup merge of #32935 - pierzchalski:restore_trait_impl_docs, r=alexcrichton
Restore trait impl docs

Currently, documentation on methods in trait implementations doesn't get rendered. This changes that;  trait implementations have all documentation associated with impl items displayed (documentation from the trait definition is ignored).

Fixes #24838
Fixes #26871
2016-04-16 01:18:05 +05:30
Manish Goregaokar
50932f5c6a
Rollup merge of #32931 - deepak:gh-issue-32928-update-cargo-in-getting-started-doc, r=GuillaumeGomez
Doc fix: Update Cargo.toml in book/getting-started

The Cargo.toml mentioned in book/getting-started
is missing the section called `[dependencies]`

fixes https://github.com/rust-lang/rust/issues/32928
2016-04-16 01:18:04 +05:30
Manish Goregaokar
7e36dc36d3
Rollup merge of #32929 - LeoTestard:featureck-comment, r=GuillaumeGomez
Update a comment to reflect changes in tidy checks.
2016-04-16 01:18:03 +05:30
Manish Goregaokar
70601b8da2
Rollup merge of #32926 - caipre:rustbuild-verify-download, r=alexcrichton
rustbuild: Verify sha256 of downloaded tarballs

Here's a quick first pass at this.

I don't use Python often enough to claim that this is totally Pythonic. I've left off some (almost certainly unnecessary) error handling regarding opening and processing files. The whole tarball is read into memory to calculate the hash, but the file isn't *so* large so that should be fine. I don't care for the output from `raise RuntimeError`, but that's how `run()` does it so I'm following precedent.

Tested by manually changing the value of `expected`, and by modifying the tarball then forcing `rustc_out_of_date()`. Both cases tripped the error.

Closes https://github.com/rust-lang/rust/issues/32902
2016-04-16 01:18:01 +05:30
Manish Goregaokar
6a0cfbcac2 Rollup merge of #32923 - jseyfried:fix_hygiene, r=nrc
Fix macro hygiene bug

This fixes #32922 (EDIT: and fixes #31856), macro hygiene bugs.
It is a [breaking-change]. For example, the following would break:
```rust
fn main() {
    let x = true;
    macro_rules! foo { () => {
        let x = 0;
        macro_rules! bar { () => {x} }
        let _: bool = bar!();
        //^ `bar!()` used to resolve the first `x` (a bool),
        //| but will now resolve to the second x (an i32).
    }}
    foo! {};
}
```

r? @nrc
2016-04-16 01:16:43 +05:30
bors
9debf51f4b Auto merge of #32338 - lukaspustina:doc-std-process, r=alexcrichton
Extends rustdoc on how to caputure output

- The documentation is quite about how to caputure a process' output when using
  ` std::process::Child::wait_with_output()`.
- This PR adds an example for this particular use case.
2016-04-15 12:41:25 -07:00
Florian Berger
daa48a294f Fix link in contributing page 2016-04-15 22:28:32 +03:00
bors
ccc7e95a96 Auto merge of #32972 - alexcrichton:cargotest, r=brson
cargotest: Put output in build directory

Right now cargotest uses `TempDir` to place output into the system temp
directory, but unfortunately this means that if the process is interrupted then
it'll leak the directory and that'll never get cleaned up. One of our bots
filled up its disk space and there were 20 cargotest directories lying around so
seems prudent to clean them up!

By putting the output in the build directory it should ensure that we don't leak
too many extra builds.
2016-04-15 10:32:10 -07:00
Alex Crichton
ae79ce3f03 std: Change String::truncate to panic less
The `Vec::truncate` method does not panic if the length argument is greater than
the vector's current length, but `String::truncate` will indeed panic. This
semantic difference can be a bit jarring (e.g. #32717), and after some
discussion the libs team concluded that although this can technically be a
breaking change it is almost undoubtedly not so in practice.

This commit changes the semantics of `String::truncate` to be a noop if
`new_len` is greater than the length of the current string.

Closes #32717
2016-04-15 10:13:43 -07:00
Alex Crichton
99c0547854 alloc_system: Handle failure properly
The Unix implementation was incorrectly handling failure for reallocation of
over-aligned types by not checking for NULL.

Closes #32993
2016-04-15 10:02:21 -07:00
Alex Crichton
73c2d2a741 cargotest: Put output in build directory
Right now cargotest uses `TempDir` to place output into the system temp
directory, but unfortunately this means that if the process is interrupted then
it'll leak the directory and that'll never get cleaned up. One of our bots
filled up its disk space and there were 20 cargotest directories lying around so
seems prudent to clean them up!

By putting the output in the build directory it should ensure that we don't leak
too many extra builds.
2016-04-15 09:23:12 -07:00
Tobias Bucher
3df35a01e9 Implement Default for more types in the standard library
Also add `Hash` to `std::cmp::Ordering` and most possible traits to
`fmt::Error`.
2016-04-15 17:53:43 +02:00
bors
5d5f4b5e3f Auto merge of #32915 - dtolnay:rawptr, r=nrc
Bare raw pointers have been disallowed forever

This change was in 0.12.0, a year and a half ago. Let's move on!
2016-04-15 08:23:36 -07:00
Michael Woerister
e8441b6784 Add initial version of codegen unit partitioning for incremental compilation. 2016-04-15 10:05:53 -04:00
bors
74b3684d00 Auto merge of #32895 - alexcrichton:rustbuild-beta, r=brson
rustbuild: Fix handling of the bootstrap key

Bring the calculation logic in line with the makefiles and also set the
RUSTC_BOOTSTRAP_KEY environment variable to enable the bootstrap on the stable
compiler.
2016-04-15 04:10:11 -07:00
bors
a7b5d69ba5 Auto merge of #32851 - apasel422:spec-extend, r=alexcrichton
Specialize `Extend` to `append` for `{LinkedList, Vec}`
2016-04-15 02:01:05 -07:00
pierzchalski
ec5e0f81cf Add flag for whether an item is default or not.
We don't want to render default item docs but previously
`doctraititem` naively delegated to the trait definition in those
cases.

Updated tests to also check that this doesn't strip default item
docs from the trait definition.
2016-04-15 14:41:54 +10:00
bors
4091cd0c5d Auto merge of #32693 - kamalmarhubi:binary_search_by_key, r=alexcrichton
collections: Add slice::binary_search_by_key

This method adds to the family of `_by_key` methods, and is the
counterpart of `slice::sort_by_key`. It was mentioned on #30423 but
was not implemented at that time.

Refs #30423
2016-04-14 21:23:35 -07:00
pierzchalski
d95ca2822c Add tests against weird provided/required method behaviour
In `test/rustdoc/manual_impl.rs` there are now three structs:

* S1 implements and documents required method `a_method`.
* S2 implements and documents `a_method` as well as provided
  method `b_method`.
* S3 implements `a_method` and `b_method`, but only documents
  `b_method`.

For a struct, we want the rendered trait impls to include documentation
if and only if it appears on the trait implementation itself
(since users can just go to the trait definition for anything not
covered in the impl docs). This means we expect:

* S1, S2, and S3 to all include top-level trait impl docs.
* S1, S2, and S3 to exclude all trait definition docs.
* S1 to show impl docs for `a_method`.
* S2 to show impl docs for `a_method` and `b_method`.
* S3 to show impl docs for `b_method`.

These tests cover those cases.
2016-04-15 13:13:55 +10:00
Jeffrey Seyfried
ca1d29c4de Add another test for issue #31856 2016-04-15 02:22:34 +00:00
bors
76c1a0df2b Auto merge of #32317 - taralx:master, r=alexcrichton
Deduplicate libraries on hash instead of filename.

Removes the need for canonicalization to prevent #12459.

(Now with passing tests!)

Canonicalization breaks certain environments where the libraries are symlinks to files that don't end in .rlib (e.g. /remote/cas/$HASH).
2016-04-14 19:14:21 -07:00
bors
2174bd97c1 Auto merge of #32960 - steveklabnik:rollup, r=steveklabnik
Rollup of 15 pull requests

- Successful merges: #32646, #32855, #32856, #32865, #32868, #32869, #32876, #32884, #32885, #32893, #32894, #32932, #32937, #32940, #32941
- Failed merges: #32912
2016-04-14 16:02:32 -07:00
Kaiyin Zhong
f91649144e remove "#" symbols to make the code compile 2016-04-15 00:51:20 +02:00
JP Sugarbroad
2218245a6d Deduplicate libraries on hash instead of filename. 2016-04-14 13:29:47 -07:00
JP Sugarbroad
37e59b9239 Accommodate the case where dup lang items are entirely external.
Fixes #32961
2016-04-14 13:25:45 -07:00
bors
2b5d24ac5a Auto merge of #32940 - birkenfeld:patch-3, r=alexcrichton
Fix a typo and add a missing word
2016-04-14 13:02:22 -07:00
Tshepang Lekhonkhobe
571607fe24 doc: add missing comma 2016-04-14 21:24:11 +02:00
Steve Klabnik
7e2302b253 Rollup merge of #32941 - bungcip:fix-doc-1, r=alexcrichton
fix str::split_at_mut() example

fix documentation issue #32933
2016-04-14 14:49:11 -04:00
Steve Klabnik
e14401f491 Rollup merge of #32940 - birkenfeld:patch-3, r=alexcrichton
Fix a typo and add a missing word
2016-04-14 14:49:11 -04:00
Steve Klabnik
eadd5748ce Rollup merge of #32937 - deepak:gh-issue-32936-remove-next-project-in-guessing-game-doc, r=Manishearth
Doc fix: Do not mention next project in book/guessing-game

fixes https://github.com/rust-lang/rust/issues/32936
2016-04-14 14:49:11 -04:00
Steve Klabnik
302f2aa01c Rollup merge of #32932 - Manishearth:fx-mir, r=bluss
Make rustc_mir pass rustdoc

None
2016-04-14 14:49:11 -04:00
Steve Klabnik
e548880524 Rollup merge of #32894 - brson:fixbeta, r=alexcrichton
Fix beta branch

This test tests a message that is only displayed on nightly.

Still testing this locally, but I suspect it's correct. r? @alexcrichton
2016-04-14 14:49:10 -04:00
Steve Klabnik
22877d6f18 Rollup merge of #32893 - khernyo:clarify-try-doc, r=steveklabnik
Clarify try! doc example

The original is correct, but a bit misleading.

r? @steveklabnik
2016-04-14 14:49:10 -04:00
Steve Klabnik
9fa8b493a0 Rollup merge of #32885 - rkjnsn:patch-2, r=alexcrichton
Fix conflicting link identifiers

Caused "Errors for non-exhaustive match patterns now list up to 3 missing variants while also indicating the total number of missing variants if more than 3." to link to "libsyntax: Restrict where non-inline modules can appear (fixes #29765)"
2016-04-14 14:49:10 -04:00
Steve Klabnik
34ccdf9dfd Rollup merge of #32884 - brson:bump, r=alexcrichton
Bump to 1.10
2016-04-14 14:49:10 -04:00
Steve Klabnik
3a208308e3 Rollup merge of #32876 - dhuseby:freebsd_32_snap_235d774, r=alexcrichton
i386-unknown-freebsd snap 235d774

@alexcrichton when merging this, please upload the snapshot file:

https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2016-03-18-235d774-freebsd-i386-b5a87e66e3e3eed5f0b68367ad22f25f0be2d4ea.tar.bz2
2016-04-14 14:49:10 -04:00
Steve Klabnik
657cae03e9 Rollup merge of #32869 - bluss:char-boundary-test, r=brson
Add test for is_char_boundary

Add test for is_char_boundary

Apparently there was no test for this method. This test is rather simple, not exhaustive.
2016-04-14 14:49:09 -04:00
Steve Klabnik
c353eae4ac Rollup merge of #32868 - kraai:remove-comma, r=GuillaumeGomez
Remove an extra command from the usage message
2016-04-14 14:49:09 -04:00