]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRollup merge of #33044 - petrochenkov:prefix, r=eddyb
Manish Goregaokar [Sun, 17 Apr 2016 12:20:35 +0000 (17:50 +0530)]
Rollup merge of #33044 - petrochenkov:prefix, r=eddyb

syntax: Parse import prefixes as paths

Fixes https://github.com/rust-lang/rust/issues/10415

r? @eddyb
(This partially intersects with https://github.com/rust-lang/rust/pull/33041)

8 years agoRollup merge of #33039 - bluss:trait-obj-error, r=arielb1
Manish Goregaokar [Sun, 17 Apr 2016 12:20:35 +0000 (17:50 +0530)]
Rollup merge of #33039 - bluss:trait-obj-error, r=arielb1

Adjust example for error E0225

Adjust example for error E0225

It's using Copy as a trait object compatible trait, which is not
appropriate, change to use a more typical Read + Send + Sync example.

Also use whitespace around `+`.

This seems appropriate apropos issue #32963

8 years agoRollup merge of #33032 - kindlychung:patch-3, r=Manishearth
Manish Goregaokar [Sun, 17 Apr 2016 12:20:34 +0000 (17:50 +0530)]
Rollup merge of #33032 - kindlychung:patch-3, r=Manishearth

Update casting-between-types.md

8 years agoRollup merge of #33023 - tbu-:pr_wrapping_traits, r=alexcrichton
Manish Goregaokar [Sun, 17 Apr 2016 12:20:34 +0000 (17:50 +0530)]
Rollup merge of #33023 - tbu-:pr_wrapping_traits, r=alexcrichton

Implement `Display` and `Hash` for `std::num::Wrapping`

Also, change the `Debug` implementation to only show the inner value.

Fixes #33006.

8 years agoRollup merge of #33022 - Mr4x:master, r=bluss
Manish Goregaokar [Sun, 17 Apr 2016 12:20:34 +0000 (17:50 +0530)]
Rollup merge of #33022 - Mr4x:master, r=bluss

Fix f32::sin_cos and f64::sin_cos examples

8 years agoRollup merge of #33003 - fbergr:link, r=steveklabnik
Manish Goregaokar [Sun, 17 Apr 2016 12:20:34 +0000 (17:50 +0530)]
Rollup merge of #33003 - fbergr:link, r=steveklabnik

Fix link in contributing page

Link was broken (404).

8 years agoRollup merge of #32956 - GuillaumeGomez:ptr_examples, r=steveklabnik
Manish Goregaokar [Sun, 17 Apr 2016 12:20:34 +0000 (17:50 +0530)]
Rollup merge of #32956 - GuillaumeGomez:ptr_examples, r=steveklabnik

Add examples for std::ptr module functions

Part of #29371.

r? @steveklabnik

8 years agoRollup merge of #31441 - gereeter:btree-docs, r=bluss
Manish Goregaokar [Sun, 17 Apr 2016 12:20:33 +0000 (17:50 +0530)]
Rollup merge of #31441 - gereeter:btree-docs, r=bluss

Start documenting BTreeMap's node interface

cc @Gankro @apasel422

8 years agoAuto merge of #32987 - xosmig:binary_heap_extension, r=apasel422
bors [Sun, 17 Apr 2016 08:16:02 +0000 (01:16 -0700)]
Auto merge of #32987 - xosmig:binary_heap_extension, r=apasel422

collections: add append for binary heap

8 years agoAuto merge of #32977 - alexcrichton:ignore-panics, r=brson
bors [Sun, 17 Apr 2016 06:06:29 +0000 (23:06 -0700)]
Auto merge of #32977 - alexcrichton:ignore-panics, r=brson

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

8 years agoAuto merge of #32952 - eddyb:mir-debuginfo-2, r=michaelwoerister
bors [Sun, 17 Apr 2016 03:40:33 +0000 (20:40 -0700)]
Auto merge of #32952 - eddyb:mir-debuginfo-2, r=michaelwoerister

Get all (but one) of debuginfo tests to pass with MIR codegen.

I didn't get much feedback in #31005 so I went ahead and implemented something simple.
Closes #31005, as MIR debuginfo should work now for most usecases.

The `no-debug-attribute` test no longer assumes variables are in scope of `return`.
We might also want to revisit that in #32949, but the test is more reliable now either way.

In order to get one last function in the `associated-type` test pass, this PR also fixes #32790.

8 years agoAuto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichton
bors [Sun, 17 Apr 2016 01:31:11 +0000 (18:31 -0700)]
Auto merge of #32909 - sanxiyn:unused-trait-import-2, r=alexcrichton

Remove unused trait imports

8 years agosyntax: Parse import prefixes as paths
Vadim Petrochenkov [Sun, 17 Apr 2016 00:48:40 +0000 (03:48 +0300)]
syntax: Parse import prefixes as paths

8 years agoAuto merge of #32875 - jseyfried:1422_implementation, r=nikomatsakis
bors [Sat, 16 Apr 2016 23:21:09 +0000 (16:21 -0700)]
Auto merge of #32875 - jseyfried:1422_implementation, r=nikomatsakis

Implement `pub(restricted)` privacy (RFC 1422)

This implements `pub(restricted)` privacy from RFC 1422 (cc #32409) behind a feature gate.

`pub(restricted)` paths currently cannot use re-exported modules both for simplicity of implementation and for future compatibility with RFC 1560 (cf #31783).

r? @nikomatsakis

8 years agoAdd tests for `pub(restricted)`
Jeffrey Seyfried [Sun, 10 Apr 2016 11:52:25 +0000 (11:52 +0000)]
Add tests for `pub(restricted)`

8 years agoAlways report PRIVATE_IN_PUBLIC violations as hard errors when
Jeffrey Seyfried [Wed, 13 Apr 2016 03:21:17 +0000 (03:21 +0000)]
Always report PRIVATE_IN_PUBLIC violations as hard errors when
the feature `pub_restricted` is enabled.

8 years agoAdjust example for error E0225
Ulrik Sverdrup [Sat, 16 Apr 2016 19:29:31 +0000 (21:29 +0200)]
Adjust example for error E0225

It's using Copy as a trait object compatible trait, which is not
appropriate, change to use a more typical Read + Send + Sync example.

Also use whitespace around `+`.

8 years agomir: place match pattern bindings in their respective arms.
Eduard Burtescu [Thu, 14 Apr 2016 14:17:37 +0000 (17:17 +0300)]
mir: place match pattern bindings in their respective arms.

8 years agodebuginfo: argument and upvar names for MIR.
Eduard Burtescu [Sat, 16 Apr 2016 18:51:26 +0000 (21:51 +0300)]
debuginfo: argument and upvar names for MIR.

8 years agoAuto merge of #33019 - kamalmarhubi:binary_search_by_key, r=alexcrichton
bors [Sat, 16 Apr 2016 18:51:13 +0000 (11:51 -0700)]
Auto merge of #33019 - kamalmarhubi:binary_search_by_key, r=alexcrichton

slice: Add tracking issue for slice_binary_search_by_key

8 years agoUpdate casting-between-types.md
Kaiyin Zhong [Sat, 16 Apr 2016 16:04:27 +0000 (18:04 +0200)]
Update casting-between-types.md

8 years agotest: don't depend on locals being in scope on the return path.
Eduard Burtescu [Thu, 14 Apr 2016 07:55:40 +0000 (10:55 +0300)]
test: don't depend on locals being in scope on the return path.

8 years agoImplement `Display` and `Hash` for `std::num::Wrapping`
Tobias Bucher [Sat, 16 Apr 2016 07:51:21 +0000 (09:51 +0200)]
Implement `Display` and `Hash` for `std::num::Wrapping`

Also, change the `Debug` implementation to only show the inner value.

Fixes #33006.

8 years agoFix f32::sin_cos and f64::sin_cos examples
Maxim Samburskiy [Sat, 16 Apr 2016 06:42:37 +0000 (11:42 +0500)]
Fix f32::sin_cos and f64::sin_cos examples

8 years agoAuto merge of #32785 - tbu-:pr_more_defaults, r=alexcrichton
bors [Sat, 16 Apr 2016 03:26:19 +0000 (20:26 -0700)]
Auto merge of #32785 - tbu-:pr_more_defaults, r=alexcrichton

Implement `Default` for more types in the standard library

Also add `Hash` to `std::cmp::Ordering` and most possible traits to
`fmt::Error`.

8 years agoAuto merge of #32779 - michaelwoerister:partitioning, r=nikomatsakis
bors [Sat, 16 Apr 2016 01:13:59 +0000 (18:13 -0700)]
Auto merge of #32779 - michaelwoerister:partitioning, r=nikomatsakis

Add initial version of codegen unit partitioning for incremental compilation.

The task of the partitioning module is to take the complete set of translation items of a crate and produce a set of codegen units from it, where a codegen unit is a named set of (translation-item, linkage) pairs. That is, this module decides which translation item appears in which codegen units with which linkage.

This version only handles the case of partitioning for incremental compilation, not the regular N-codegen units case. In the future the regular case should be handled too, maybe even doing a bit more analysis to intelligently figure out a good partitioning.

One thing that could be improved is the syntax of the codegen unit tests. Right now they still use the compile-fail error specification infrastructure, so everything has to be on one line. Would be nice to be able to format things in a more readable way.

8 years agoslice: Add tracking issue for slice_binary_search_by_key
Kamal Marhubi [Fri, 15 Apr 2016 23:27:03 +0000 (19:27 -0400)]
slice: Add tracking issue for slice_binary_search_by_key

8 years agoAuto merge of #33005 - Manishearth:rollup, r=Manishearth
bors [Fri, 15 Apr 2016 21:51:16 +0000 (14:51 -0700)]
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:

8 years agocollections: add append and extend specialization for binary heap
Andrey Tonkih [Thu, 14 Apr 2016 23:18:52 +0000 (02:18 +0300)]
collections: add append and extend specialization for binary heap

8 years agoRollup merge of #32997 - alexcrichton:fix-alloc-system-how-did-this-land, r=nagisa
Manish Goregaokar [Fri, 15 Apr 2016 19:46:45 +0000 (01:16 +0530)]
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

8 years agoRollup merge of #32973 - kindlychung:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 15 Apr 2016 19:46:45 +0000 (01:16 +0530)]
Rollup merge of #32973 - kindlychung:patch-1, r=steveklabnik

remove "#" symbols to make the code compile

8 years agoRollup merge of #32970 - taralx:patch-2, r=alexcrichton
Manish Goregaokar [Fri, 15 Apr 2016 19:46:45 +0000 (01:16 +0530)]
Rollup merge of #32970 - taralx:patch-2, r=alexcrichton

Accommodate the case where dup lang items are entirely external.

Fixes #32961

8 years agoRollup merge of #32964 - tshepang:comma, r=GuillaumeGomez
Manish Goregaokar [Fri, 15 Apr 2016 19:46:44 +0000 (01:16 +0530)]
Rollup merge of #32964 - tshepang:comma, r=GuillaumeGomez

doc: add missing comma

8 years agoRollup merge of #32946 - eddyb:issue-32783, r=dotdash
Manish Goregaokar [Fri, 15 Apr 2016 19:46:44 +0000 (01:16 +0530)]
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.

8 years agoRollup merge of #32945 - durka:rfc1494, r=pnkfelix
Manish Goregaokar [Fri, 15 Apr 2016 19:46:44 +0000 (01:16 +0530)]
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.

8 years agoRollup merge of #32935 - pierzchalski:restore_trait_impl_docs, r=alexcrichton
Manish Goregaokar [Fri, 15 Apr 2016 19:46:44 +0000 (01:16 +0530)]
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

8 years agoRollup merge of #32931 - deepak:gh-issue-32928-update-cargo-in-getting-started-doc...
Manish Goregaokar [Fri, 15 Apr 2016 19:46:44 +0000 (01:16 +0530)]
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

8 years agoRollup merge of #32929 - LeoTestard:featureck-comment, r=GuillaumeGomez
Manish Goregaokar [Fri, 15 Apr 2016 19:46:44 +0000 (01:16 +0530)]
Rollup merge of #32929 - LeoTestard:featureck-comment, r=GuillaumeGomez

Update a comment to reflect changes in tidy checks.

8 years agoRollup merge of #32926 - caipre:rustbuild-verify-download, r=alexcrichton
Manish Goregaokar [Fri, 15 Apr 2016 19:46:43 +0000 (01:16 +0530)]
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

8 years agoRollup merge of #32923 - jseyfried:fix_hygiene, r=nrc
Manish Goregaokar [Fri, 15 Apr 2016 19:46:43 +0000 (01:16 +0530)]
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

8 years agoAuto merge of #32338 - lukaspustina:doc-std-process, r=alexcrichton
bors [Fri, 15 Apr 2016 19:41:25 +0000 (12:41 -0700)]
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.

8 years agoFix link in contributing page
Florian Berger [Fri, 15 Apr 2016 19:28:32 +0000 (22:28 +0300)]
Fix link in contributing page

8 years agoAuto merge of #32972 - alexcrichton:cargotest, r=brson
bors [Fri, 15 Apr 2016 17:32:10 +0000 (10:32 -0700)]
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.

8 years agostd: Change String::truncate to panic less
Alex Crichton [Thu, 14 Apr 2016 23:56:59 +0000 (16:56 -0700)]
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

8 years agoalloc_system: Handle failure properly
Alex Crichton [Fri, 15 Apr 2016 17:02:21 +0000 (10:02 -0700)]
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

8 years agocargotest: Put output in build directory
Alex Crichton [Thu, 14 Apr 2016 21:27:51 +0000 (14:27 -0700)]
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.

8 years agoImplement `Default` for more types in the standard library
Tobias Bucher [Fri, 15 Apr 2016 15:53:43 +0000 (17:53 +0200)]
Implement `Default` for more types in the standard library

Also add `Hash` to `std::cmp::Ordering` and most possible traits to
`fmt::Error`.

8 years agoAuto merge of #32915 - dtolnay:rawptr, r=nrc
bors [Fri, 15 Apr 2016 15:23:36 +0000 (08:23 -0700)]
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!

8 years agoAdd initial version of codegen unit partitioning for incremental compilation.
Michael Woerister [Thu, 24 Mar 2016 15:40:49 +0000 (11:40 -0400)]
Add initial version of codegen unit partitioning for incremental compilation.

8 years agoAuto merge of #32895 - alexcrichton:rustbuild-beta, r=brson
bors [Fri, 15 Apr 2016 11:10:11 +0000 (04:10 -0700)]
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.

8 years agoAuto merge of #32851 - apasel422:spec-extend, r=alexcrichton
bors [Fri, 15 Apr 2016 09:01:05 +0000 (02:01 -0700)]
Auto merge of #32851 - apasel422:spec-extend, r=alexcrichton

Specialize `Extend` to `append` for `{LinkedList, Vec}`

8 years agoAdd flag for whether an item is default or not.
pierzchalski [Fri, 15 Apr 2016 04:41:54 +0000 (14:41 +1000)]
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.

8 years agoAuto merge of #32693 - kamalmarhubi:binary_search_by_key, r=alexcrichton
bors [Fri, 15 Apr 2016 04:23:35 +0000 (21:23 -0700)]
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

8 years agoAdd tests against weird provided/required method behaviour
pierzchalski [Fri, 15 Apr 2016 03:13:55 +0000 (13:13 +1000)]
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.

8 years agoAdd another test for issue #31856
Jeffrey Seyfried [Fri, 15 Apr 2016 02:22:34 +0000 (02:22 +0000)]
Add another test for issue #31856

8 years agoAuto merge of #32317 - taralx:master, r=alexcrichton
bors [Fri, 15 Apr 2016 02:14:21 +0000 (19:14 -0700)]
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).

8 years agoAuto merge of #32960 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 14 Apr 2016 23:02:32 +0000 (16:02 -0700)]
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

8 years agoremove "#" symbols to make the code compile
Kaiyin Zhong [Thu, 14 Apr 2016 22:51:20 +0000 (00:51 +0200)]
remove "#" symbols to make the code compile

8 years agoDeduplicate libraries on hash instead of filename.
JP Sugarbroad [Tue, 5 Apr 2016 02:07:08 +0000 (19:07 -0700)]
Deduplicate libraries on hash instead of filename.

8 years agoAccommodate the case where dup lang items are entirely external.
JP Sugarbroad [Thu, 14 Apr 2016 20:25:14 +0000 (13:25 -0700)]
Accommodate the case where dup lang items are entirely external.

Fixes #32961

8 years agoAuto merge of #32940 - birkenfeld:patch-3, r=alexcrichton
bors [Thu, 14 Apr 2016 20:02:22 +0000 (13:02 -0700)]
Auto merge of #32940 - birkenfeld:patch-3, r=alexcrichton

Fix a typo and add a missing word

8 years agodoc: add missing comma
Tshepang Lekhonkhobe [Thu, 14 Apr 2016 19:24:11 +0000 (21:24 +0200)]
doc: add missing comma

8 years agoRollup merge of #32941 - bungcip:fix-doc-1, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:11 +0000 (14:49 -0400)]
Rollup merge of #32941 - bungcip:fix-doc-1, r=alexcrichton

fix str::split_at_mut() example

fix documentation issue #32933

8 years agoRollup merge of #32940 - birkenfeld:patch-3, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:11 +0000 (14:49 -0400)]
Rollup merge of #32940 - birkenfeld:patch-3, r=alexcrichton

Fix a typo and add a missing word

8 years agoRollup merge of #32937 - deepak:gh-issue-32936-remove-next-project-in-guessing-game...
Steve Klabnik [Thu, 14 Apr 2016 18:49:11 +0000 (14:49 -0400)]
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

8 years agoRollup merge of #32932 - Manishearth:fx-mir, r=bluss
Steve Klabnik [Thu, 14 Apr 2016 18:49:11 +0000 (14:49 -0400)]
Rollup merge of #32932 - Manishearth:fx-mir, r=bluss

Make rustc_mir pass rustdoc

None

8 years agoRollup merge of #32894 - brson:fixbeta, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:10 +0000 (14:49 -0400)]
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

8 years agoRollup merge of #32893 - khernyo:clarify-try-doc, r=steveklabnik
Steve Klabnik [Thu, 14 Apr 2016 18:49:10 +0000 (14:49 -0400)]
Rollup merge of #32893 - khernyo:clarify-try-doc, r=steveklabnik

Clarify try! doc example

The original is correct, but a bit misleading.

r? @steveklabnik

8 years agoRollup merge of #32885 - rkjnsn:patch-2, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:10 +0000 (14:49 -0400)]
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)"

8 years agoRollup merge of #32884 - brson:bump, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:10 +0000 (14:49 -0400)]
Rollup merge of #32884 - brson:bump, r=alexcrichton

Bump to 1.10

8 years agoRollup merge of #32876 - dhuseby:freebsd_32_snap_235d774, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:10 +0000 (14:49 -0400)]
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

8 years agoRollup merge of #32869 - bluss:char-boundary-test, r=brson
Steve Klabnik [Thu, 14 Apr 2016 18:49:09 +0000 (14:49 -0400)]
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.

8 years agoRollup merge of #32868 - kraai:remove-comma, r=GuillaumeGomez
Steve Klabnik [Thu, 14 Apr 2016 18:49:09 +0000 (14:49 -0400)]
Rollup merge of #32868 - kraai:remove-comma, r=GuillaumeGomez

Remove an extra command from the usage message

8 years agoRollup merge of #32865 - caipre:llvm-ninja, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:09 +0000 (14:49 -0400)]
Rollup merge of #32865 - caipre:llvm-ninja, r=alexcrichton

Add rustbuild option to use Ninja for LLVM build

This change adds support for a `ninja` option in the `[llvm]` section of rustbuild's `config.toml`. When `true`, the option enables use of the Ninja build tool. Note that this change does not add support for Ninja to the old makefile based build system.

Closes https://github.com/rust-lang/rust/issues/32809

r? @alexcrichton

8 years agoRollup merge of #32856 - cardoe:target-spec-path, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:09 +0000 (14:49 -0400)]
Rollup merge of #32856 - cardoe:target-spec-path, r=alexcrichton

librustc_back: fix incorrect comment about RUST_TARGET_PATH

The path `/etc/rustc/` is not the default last entry in
RUST_TARGET_PATH. This was in RFC131 but was never implemented in rustc
so it was removed as part of #31117 and rust-lang/rfcs#1473.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
8 years agoRollup merge of #32855 - troplin:take-bufread-fix, r=alexcrichton
Steve Klabnik [Thu, 14 Apr 2016 18:49:09 +0000 (14:49 -0400)]
Rollup merge of #32855 - troplin:take-bufread-fix, r=alexcrichton

Don't read past limit for in BufRead instance of Take

Similar to `Read::read`, `BufRead::fill_buf` impl of `Take` should not call `inner.fill_buf` if the limit is already reached.

8 years agoRollup merge of #32646 - Ms2ger:Constructor, r=sanxiyn
Steve Klabnik [Thu, 14 Apr 2016 18:49:09 +0000 (14:49 -0400)]
Rollup merge of #32646 - Ms2ger:Constructor, r=sanxiyn

Stop re-exporting check_match::Constructor.

8 years agoMove translation-item-collection tests into subfolder.
Michael Woerister [Wed, 6 Apr 2016 19:34:16 +0000 (15:34 -0400)]
Move translation-item-collection tests into subfolder.

8 years agoImprove message for raw pointer missing mut and const
David Tolnay [Thu, 14 Apr 2016 16:46:27 +0000 (09:46 -0700)]
Improve message for raw pointer missing mut and const

"Bare raw pointer" does not exist as a concept.

8 years agoAdd examples for std::ptr module functions
ggomez [Thu, 14 Apr 2016 16:42:00 +0000 (18:42 +0200)]
Add examples for std::ptr module functions

8 years agoAuto merge of #32908 - oli-obk:hygienic_derive_encodable, r=alexcrichton
bors [Thu, 14 Apr 2016 15:23:11 +0000 (08:23 -0700)]
Auto merge of #32908 - oli-obk:hygienic_derive_encodable, r=alexcrichton

prevent other `encode` methods from breaking `derive(RustcEncodable)`

fixes https://github.com/rust-lang-nursery/rustc-serialize/issues/151

8 years agoAuto merge of #32892 - brson:relnotes19, r=alexcrichton
bors [Thu, 14 Apr 2016 12:58:25 +0000 (05:58 -0700)]
Auto merge of #32892 - brson:relnotes19, r=alexcrichton

Release notes for 1.9

8 years agoSpecialize `Extend` to `append` for `{LinkedList, Vec}`
Andrew Paseltiner [Sat, 9 Apr 2016 03:36:54 +0000 (23:36 -0400)]
Specialize `Extend` to `append` for `{LinkedList, Vec}`

8 years agoAuto merge of #32883 - sanxiyn:nameless-defkey, r=arielb1
bors [Thu, 14 Apr 2016 10:49:14 +0000 (03:49 -0700)]
Auto merge of #32883 - sanxiyn:nameless-defkey, r=arielb1

Do not encode name when encoding DefKey

Since name is encoded anyway, name in DefKey is redundant.

cc #32719.

8 years agoAuto merge of #32718 - timonvo:bootstrap-skip-docs, r=alexcrichton
bors [Thu, 14 Apr 2016 07:38:58 +0000 (00:38 -0700)]
Auto merge of #32718 - timonvo:bootstrap-skip-docs, r=alexcrichton

rustbuild: Skip generating docs if the config disables them.

r? @alexcrichton

8 years agotrans: always register an item's symbol, even if duplicated.
Eduard Burtescu [Thu, 14 Apr 2016 05:39:23 +0000 (08:39 +0300)]
trans: always register an item's symbol, even if duplicated.

8 years agoAuto merge of #32877 - oli-obk:const_err_multi, r=arielb1
bors [Thu, 14 Apr 2016 05:33:10 +0000 (22:33 -0700)]
Auto merge of #32877 - oli-obk:const_err_multi, r=arielb1

don't report errors in constants at every use site

partially fixes #32842

r? @arielb1
cc @retep998

I chose this way of implementing it, because the alternative (checking if the error span is inside the constant's expressions's span) would get confusing when combined with expression generating macros.

A next step would be to re-enable the re-reporting of errors if the original erroneous constant is in another crate.

8 years agoFeature gate `pub(restricted)`
Jeffrey Seyfried [Sun, 10 Apr 2016 23:33:36 +0000 (23:33 +0000)]
Feature gate `pub(restricted)`

8 years agoParse `pub(restricted)`
Jeffrey Seyfried [Mon, 11 Apr 2016 00:39:35 +0000 (00:39 +0000)]
Parse `pub(restricted)`

8 years agoresolve: refactor away `PRIVATE_VARIANT` and ensure that restricted
Jeffrey Seyfried [Mon, 11 Apr 2016 05:35:18 +0000 (05:35 +0000)]
resolve: refactor away `PRIVATE_VARIANT` and ensure that restricted
reexports of private variants are handled correctly.

8 years agoresolve: use the `Restricted` variant of `ty::Visibility` when privacy checking
Jeffrey Seyfried [Sun, 10 Apr 2016 00:44:14 +0000 (00:44 +0000)]
resolve: use the `Restricted` variant of `ty::Visibility` when privacy checking

8 years agoresolve: Use `vis: ty::Visibility` instead of `is_public: bool`
Jeffrey Seyfried [Sat, 9 Apr 2016 23:19:53 +0000 (23:19 +0000)]
resolve: Use `vis: ty::Visibility` instead of `is_public: bool`

8 years agoFix fallout in rustdoc
Jeffrey Seyfried [Mon, 11 Apr 2016 08:15:14 +0000 (08:15 +0000)]
Fix fallout in rustdoc

8 years agoAdd `Crate` and `Restricted` variants to `hir::Visibility`
Jeffrey Seyfried [Sat, 2 Apr 2016 20:24:02 +0000 (20:24 +0000)]
Add `Crate` and `Restricted` variants to `hir::Visibility`

8 years agoVisit visibilities in the ast visitor's `walk_*` functions
Jeffrey Seyfried [Sun, 10 Apr 2016 23:10:46 +0000 (23:10 +0000)]
Visit visibilities in the ast visitor's `walk_*` functions

8 years agoAdd a span to the `Crate` variant of `ast::Visibility`
Jeffrey Seyfried [Sun, 10 Apr 2016 23:33:07 +0000 (23:33 +0000)]
Add a span to the `Crate` variant of `ast::Visibility`

8 years agoDelegate whether to print docblocks to 'document'
pierzchalski [Thu, 14 Apr 2016 03:57:01 +0000 (13:57 +1000)]
Delegate whether to print docblocks to 'document'

Add test to check this resolves #24838 and #26871.

8 years agoimplement RFC amendment 1494
Alex Burka [Tue, 9 Feb 2016 02:47:57 +0000 (21:47 -0500)]
implement RFC amendment 1494

8 years agorustbuild: Verify sha256 of downloaded tarballs
Nick Platt [Thu, 14 Apr 2016 02:10:42 +0000 (22:10 -0400)]
rustbuild: Verify sha256 of downloaded tarballs

8 years agorustbuild: Improve error messaging in bootstrap.py
Nick Platt [Thu, 14 Apr 2016 02:10:25 +0000 (22:10 -0400)]
rustbuild: Improve error messaging in bootstrap.py

For normal invocations, print a short error message and exit. When
the verbose option is enabled, also print the backtrace.