]> git.lizzy.rs Git - rust.git/log
rust.git
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 #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 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 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 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 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 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 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 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 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.

8 years agorustbuild: Skip generating docs if the config disables them.
Timon Van Overveldt [Mon, 4 Apr 2016 04:09:19 +0000 (21:09 -0700)]
rustbuild: Skip generating docs if the config disables them.

It looks like before these config variables weren't actually taken
into account. This patch should make the build system skip over the
documentation steps correctly.

8 years agoAdd test for issue #31856
Jeffrey Seyfried [Thu, 14 Apr 2016 01:20:22 +0000 (01:20 +0000)]
Add test for issue #31856

8 years agoAuto merge of #32944 - alexcrichton:add-to-gitignore, r=brson
bors [Thu, 14 Apr 2016 00:50:12 +0000 (17:50 -0700)]
Auto merge of #32944 - alexcrichton:add-to-gitignore, r=brson

Add /obj/ to .gitignore

This is the build directory our buildbots use, and right now the bots are
running `git clean -f -f -d` to remove all untracked files between runs and this
is accidentally deleting `obj`, so we're building LLVM a lot.

Hopefully this keeps the bots caching `obj` so we can clean it out manually and
leave LLVM around.

8 years agoAdd /obj/ to .gitignore
Alex Crichton [Thu, 14 Apr 2016 00:46:01 +0000 (17:46 -0700)]
Add /obj/ to .gitignore

This is the build directory our buildbots use, and right now the bots are
running `git clean -f -f -d` to remove all untracked files between runs and this
is accidentally deleting `obj`, so we're building LLVM a lot.

Hopefully this keeps the bots caching `obj` so we can clean it out manually and
leave LLVM around.

8 years agoAuto merge of #32592 - tbu-:pr_range_from_overflow, r=alexcrichton
bors [Wed, 13 Apr 2016 21:26:10 +0000 (14:26 -0700)]
Auto merge of #32592 - tbu-:pr_range_from_overflow, r=alexcrichton

Add a note about overflowing in the `RangeFrom` iterator

8 years agofix str::split_at_mut() example
Gigih Aji Ibrahim [Wed, 13 Apr 2016 20:39:10 +0000 (03:39 +0700)]
fix str::split_at_mut() example

8 years agoAuto merge of #32780 - soltanmm:consider-the-following, r=nikomatsakis
bors [Wed, 13 Apr 2016 18:28:30 +0000 (11:28 -0700)]
Auto merge of #32780 - soltanmm:consider-the-following, r=nikomatsakis

Replace consider_unification_despite_ambiguity with new obligation variant

Is work towards #32730. Addresses part one of #32286. Addresses #24210 and #26046 to some degree.

r? @nikomatsakis

8 years agoAdd a note about overflowing in the `RangeFrom` iterator
Tobias Bucher [Tue, 29 Mar 2016 21:21:13 +0000 (23:21 +0200)]
Add a note about overflowing in the `RangeFrom` iterator

8 years agoFix a typo and add a missing word
Georg Brandl [Wed, 13 Apr 2016 17:35:21 +0000 (19:35 +0200)]
Fix a typo and add a missing word

8 years agoDoc fix: Do not mention next project in book/guessing-game
Deepak Kannan [Wed, 13 Apr 2016 15:53:42 +0000 (21:23 +0530)]
Doc fix: Do not mention next project in book/guessing-game

The next project refers to the dining-philosophers problem
https://github.com/rust-lang/rust/blob/27a1834ce522e3ec7fe4726b1661de16ee30c503/src/doc/book/dining-philosophers.md

which was removed in
https://github.com/rust-lang/rust/commit/0c6c34de87c899ecb8b977e7ef24510ab2a68168

so removing reference to that project from book/guessing-game

8 years agoFix obscure compilation error
Masood Malekghassemi [Wed, 13 Apr 2016 14:48:53 +0000 (07:48 -0700)]
Fix obscure compilation error

8 years agoAuto merge of #32828 - vadimcn:symlinks, r=alexcrichton
bors [Wed, 13 Apr 2016 14:16:20 +0000 (07:16 -0700)]
Auto merge of #32828 - vadimcn:symlinks, r=alexcrichton

Do not rely on file extensions after path canonicalization.

Rustc does not recognize libraries which are symlinked to files having extension other than .rlib. The problem is that find_library_crate calls fs::canonicalize on found library paths, but then the resulting path is passed to get_metadata_section, which assumes it will end in ".rlib" if it's an rlib (from https://internals.rust-lang.org/t/is-library-path-canonicalization-worth-it/3206).

cc #29433

8 years agoDoc fix: Update Cargo.toml in book/getting-started
Deepak Kannan [Wed, 13 Apr 2016 10:31:05 +0000 (16:01 +0530)]
Doc fix: Update Cargo.toml in book/getting-started

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

8 years agoAuto merge of #32817 - jseyfried:warn_impl_param_defaults, r=nikomatsakis
bors [Wed, 13 Apr 2016 11:18:36 +0000 (04:18 -0700)]
Auto merge of #32817 - jseyfried:warn_impl_param_defaults, r=nikomatsakis

Warn for type parameter defaults on impl blocks

Warn for type parameter defaults on impl blocks (fixes #31543).
r? @nikomatsakis

8 years agoMake librustc_mir pass rustdoc --test
Manish Goregaokar [Wed, 13 Apr 2016 10:46:14 +0000 (16:16 +0530)]
Make librustc_mir pass rustdoc --test

8 years agoMake librustc_mir pass rustdoc
Manish Goregaokar [Wed, 13 Apr 2016 10:43:24 +0000 (16:13 +0530)]
Make librustc_mir pass rustdoc

8 years agoUpdate a comment to reflect changes in tidy checks.
Leo Testard [Wed, 13 Apr 2016 09:27:30 +0000 (11:27 +0200)]
Update a comment to reflect changes in tidy checks.

8 years agoAuto merge of #32726 - asomers:master, r=alexcrichton
bors [Wed, 13 Apr 2016 08:20:15 +0000 (01:20 -0700)]
Auto merge of #32726 - asomers:master, r=alexcrichton

Fix stack overflow detection on FreeBSD

8 years agoAuto merge of #32814 - jseyfried:improve_duplicate_glob_detection, r=nikomatsakis
bors [Wed, 13 Apr 2016 05:21:23 +0000 (22:21 -0700)]
Auto merge of #32814 - jseyfried:improve_duplicate_glob_detection, r=nikomatsakis

resolve: Improve duplicate glob detection

This fixes a bug introduced in #31726 in which we erroneously allow multiple imports of the same item under some circumstances.

More specifically, we erroneously allow a module that is in a cycle of glob re-exports to have other re-exports (besides the glob from the cycle).
For example,
```rust
pub fn f() {}
mod foo {
    pub use f; // (1) This defines `foo::f`.
    pub use bar::*; // (3) This also defines `foo::f`, which should be a duplicate error but is currently allowed.
}
mod bar {
    pub use foo::*; // (2) This defines `bar::f`.
}
```

A module in a glob re-export cycle can still have `pub` items after this PR. For example,
```rust
mod foo {
    pub fn f() {}; // (1) This defines `foo::f`.
    pub use bar::*; // (3) This is not a duplicate error since items shadow glob-imported re-exports (cf #31337).
}
mod bar {
    pub use foo::*; // (2) This defines `bar::f`.
}
```
r? @nikomatsakis

8 years agoAuto merge of #32803 - eddyb:mir-debuginfo, r=nikomatsakis
bors [Wed, 13 Apr 2016 02:22:32 +0000 (19:22 -0700)]
Auto merge of #32803 - eddyb:mir-debuginfo, r=nikomatsakis

Initial implementation of debuginfo in MIR trans.

Progress is made towards #31005, but several issues remain, such as #32790.

8 years agoAdd regression test
Jeffrey Seyfried [Wed, 13 Apr 2016 00:15:37 +0000 (00:15 +0000)]
Add regression test

8 years agoFixes #32922, a macro hygiene bug
Jeffrey Seyfried [Wed, 13 Apr 2016 00:13:44 +0000 (00:13 +0000)]
Fixes #32922, a macro hygiene bug

8 years agoAuto merge of #32590 - alexcrichton:rustbuild-tidy-checks, r=brson
bors [Tue, 12 Apr 2016 23:24:33 +0000 (16:24 -0700)]
Auto merge of #32590 - alexcrichton:rustbuild-tidy-checks, r=brson

rustbuild: Migrate tidy checks to Rust

This commit rewrites all of the tidy checks we have, namely:

* featureck
* errorck
* tidy
* binaries

into Rust under a new `tidy` tool inside of the `src/tools` directory. This at
the same time deletes all the corresponding Python tidy checks so we can be sure
to only have one source of truth for all the tidy checks.

cc #31590

8 years agotidy: Add a check to ensure Cargo.toml is in sync
Alex Crichton [Tue, 5 Apr 2016 18:18:24 +0000 (11:18 -0700)]
tidy: Add a check to ensure Cargo.toml is in sync

This verifies that the crates listed in the `[dependencies]` section of
`Cargo.toml` are a subset of the crates listed in `lib.rs` for our in-tree
crates. This should help ensure that when we refactor crates over time we keep
these dependency lists in sync.

8 years agoRelease notes for 1.9
Brian Anderson [Sat, 9 Apr 2016 01:08:52 +0000 (01:08 +0000)]
Release notes for 1.9

8 years agoBare raw pointers have been disallowed forever
David Tolnay [Tue, 12 Apr 2016 20:33:28 +0000 (13:33 -0700)]
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 agoAuto merge of #31963 - barosl:rename-doc, r=alexcrichton
bors [Tue, 12 Apr 2016 17:12:55 +0000 (10:12 -0700)]
Auto merge of #31963 - barosl:rename-doc, r=alexcrichton

Describe more platform-specific behaviors of `std::fs::rename`

I did some tests myself regarding the situation when both `from` and `to` exist, and the results were:

On Linux:

`from` | `to` | Result
---- | ---- | ----
Directory | Directory | Ok
Directory | File | Error
File | Directory | Error
File | File | Ok

On Windows:

`from` | `to` | Result
---- | ---- | ----
Directory | Directory | Error
Directory | File | Ok
File | Directory | Error
File | File | Ok

This is a bit against the official MSDN documentation, which says "(`MOVEFILE_REPLACE_EXISTING`) cannot be used if `lpNewFileName` or `lpExistingFileName` names a directory." As evidenced above, `lpExistingFileName` *can* be a directory.

I also mentioned the atomicity of the operation.

Fixes #31301.

8 years agorustbuild: Migrate tidy checks to Rust
Alex Crichton [Tue, 29 Mar 2016 20:14:52 +0000 (13:14 -0700)]
rustbuild: Migrate tidy checks to Rust

This commit rewrites all of the tidy checks we have, namely:

* featureck
* errorck
* tidy
* binaries

into Rust under a new `tidy` tool inside of the `src/tools` directory. This at
the same time deletes all the corresponding Python tidy checks so we can be sure
to only have one source of truth for all the tidy checks.

cc #31590

8 years agocollections: Add slice::binary_search_by_key
Kamal Marhubi [Wed, 23 Mar 2016 01:26:57 +0000 (21:26 -0400)]
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 agoAuto merge of #32811 - alexcrichton:check-lints, r=nrc
bors [Tue, 12 Apr 2016 14:14:55 +0000 (07:14 -0700)]
Auto merge of #32811 - alexcrichton:check-lints, r=nrc

rustdoc: Fix testing no_run code blocks

This was a regression introduced by #31250 where the compiler deferred returning
the results of compilation a little too late (after the `Stop` check was looked
at). This commit alters the stop point to first try to return an erroneous
`result` and only if it was successful return the sentinel `Err(0)`.

Closes #31576

8 years agoprevent other `encode` methods from breaking `derive(RustcEncodable)`
Oliver Schneider [Tue, 12 Apr 2016 13:41:46 +0000 (15:41 +0200)]
prevent other `encode` methods from breaking `derive(RustcEncodable)`

8 years agoAuto merge of #32804 - alexcrichton:stabilize-1.9, r=brson
bors [Tue, 12 Apr 2016 11:17:36 +0000 (04:17 -0700)]
Auto merge of #32804 - alexcrichton:stabilize-1.9, r=brson

std: Stabilize APIs for the 1.9 release

This commit applies all stabilizations, renamings, and deprecations that the
library team has decided on for the upcoming 1.9 release. All tracking issues
have gone through a cycle-long "final comment period" and the specific APIs
stabilized/deprecated are:

Stable

* `std::panic`
* `std::panic::catch_unwind` (renamed from `recover`)
* `std::panic::resume_unwind` (renamed from `propagate`)
* `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`)
* `std::panic::UnwindSafe` (renamed from `RecoverSafe`)
* `str::is_char_boundary`
* `<*const T>::as_ref`
* `<*mut T>::as_ref`
* `<*mut T>::as_mut`
* `AsciiExt::make_ascii_uppercase`
* `AsciiExt::make_ascii_lowercase`
* `char::decode_utf16`
* `char::DecodeUtf16`
* `char::DecodeUtf16Error`
* `char::DecodeUtf16Error::unpaired_surrogate`
* `BTreeSet::take`
* `BTreeSet::replace`
* `BTreeSet::get`
* `HashSet::take`
* `HashSet::replace`
* `HashSet::get`
* `OsString::with_capacity`
* `OsString::clear`
* `OsString::capacity`
* `OsString::reserve`
* `OsString::reserve_exact`
* `OsStr::is_empty`
* `OsStr::len`
* `std::os::unix::thread`
* `RawPthread`
* `JoinHandleExt`
* `JoinHandleExt::as_pthread_t`
* `JoinHandleExt::into_pthread_t`
* `HashSet::hasher`
* `HashMap::hasher`
* `CommandExt::exec`
* `File::try_clone`
* `SocketAddr::set_ip`
* `SocketAddr::set_port`
* `SocketAddrV4::set_ip`
* `SocketAddrV4::set_port`
* `SocketAddrV6::set_ip`
* `SocketAddrV6::set_port`
* `SocketAddrV6::set_flowinfo`
* `SocketAddrV6::set_scope_id`
* `<[T]>::copy_from_slice`
* `ptr::read_volatile`
* `ptr::write_volatile`
* The `#[deprecated]` attribute
* `OpenOptions::create_new`

Deprecated

* `std::raw::Slice` - use raw parts of `slice` module instead
* `std::raw::Repr` - use raw parts of `slice` module instead
* `str::char_range_at` - use slicing plus `chars()` plus `len_utf8`
* `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8`
* `str::char_at` - use slicing plus `chars()`
* `str::char_at_reverse` - use slicing plus `chars().rev()`
* `str::slice_shift_char` - use `chars()` plus `Chars::as_str`
* `CommandExt::session_leader` - use `before_exec` instead.

Closes #27719
cc #27751 (deprecating the `Slice` bits)
Closes #27754
Closes #27780
Closes #27809
Closes #27811
Closes #27830
Closes #28050
Closes #29453
Closes #29791
Closes #29935
Closes #30014
Closes #30752
Closes #31262
cc #31398 (still need to deal with `before_exec`)
Closes #31405
Closes #31572
Closes #31755
Closes #31756

8 years agoDescribe more platform-specific behaviors of `std::fs::rename`
Barosl Lee [Mon, 29 Feb 2016 06:04:22 +0000 (15:04 +0900)]
Describe more platform-specific behaviors of `std::fs::rename`

Fixes #31301.

8 years agoAuto merge of #32711 - marcusklaas:try-shorthand-span-fix, r=nagisa
bors [Tue, 12 Apr 2016 05:14:04 +0000 (22:14 -0700)]
Auto merge of #32711 - marcusklaas:try-shorthand-span-fix, r=nagisa

Fix the span for try shorthand expressions

My five character contribution to the rust parser! Fixes https://github.com/rust-lang/rust/issues/32709.

8 years agorustbuild: Fix handling of the bootstrap key
Alex Crichton [Tue, 12 Apr 2016 00:09:55 +0000 (17:09 -0700)]
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 agoFix beta branch
Brian Anderson [Tue, 12 Apr 2016 00:14:03 +0000 (00:14 +0000)]
Fix beta branch

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

8 years agoClarify try! doc example
Szabolcs Berecz [Mon, 11 Apr 2016 23:18:35 +0000 (01:18 +0200)]
Clarify try! doc example

The original is correct, but a bit misleading.

8 years agoAuto merge of #32882 - steveklabnik:rollup, r=steveklabnik
bors [Mon, 11 Apr 2016 20:20:56 +0000 (13:20 -0700)]
Auto merge of #32882 - steveklabnik:rollup, r=steveklabnik

Rollup of 9 pull requests

- Successful merges: #32768, #32802, #32815, #32823, #32849, #32854, #32862, #32870, #32873
- Failed merges:

8 years agoAdd regression test for #32797 (fixes #32797)
Jeffrey Seyfried [Fri, 8 Apr 2016 01:35:51 +0000 (01:35 +0000)]
Add regression test for #32797 (fixes #32797)

8 years agoFix the span for try shorthand expressions
Marcus Klaas [Sun, 3 Apr 2016 20:30:21 +0000 (22:30 +0200)]
Fix the span for try shorthand expressions

8 years agoFix conflicting link identifiers
rkjnsn [Mon, 11 Apr 2016 18:31:00 +0000 (11:31 -0700)]
Fix conflicting link identifiers

8 years agoAdd comments
Jeffrey Seyfried [Mon, 11 Apr 2016 18:30:48 +0000 (18:30 +0000)]
Add comments

8 years agoBump to 1.10
Brian Anderson [Mon, 11 Apr 2016 17:58:38 +0000 (17:58 +0000)]
Bump to 1.10

8 years agotests: update for MIR debuginfo.
Eduard Burtescu [Thu, 7 Apr 2016 19:43:46 +0000 (22:43 +0300)]
tests: update for MIR debuginfo.

8 years agotrans: initial implementation of MIR debuginfo.
Eduard Burtescu [Thu, 7 Apr 2016 19:35:11 +0000 (22:35 +0300)]
trans: initial implementation of MIR debuginfo.

8 years agomir: store the span of a scope in the ScopeData.
Eduard Burtescu [Wed, 6 Apr 2016 14:17:12 +0000 (17:17 +0300)]
mir: store the span of a scope in the ScopeData.

8 years agotrans: use DefKey directly in debuginfo for paths.
Eduard Burtescu [Wed, 6 Apr 2016 12:37:19 +0000 (15:37 +0300)]
trans: use DefKey directly in debuginfo for paths.

8 years agotrans: pass essential information from trans_closure to debuginfo.
Eduard Burtescu [Wed, 6 Apr 2016 07:49:50 +0000 (10:49 +0300)]
trans: pass essential information from trans_closure to debuginfo.

8 years agotrans: use Instance in trans_closure and FunctionContext::new.
Eduard Burtescu [Wed, 6 Apr 2016 05:34:03 +0000 (08:34 +0300)]
trans: use Instance in trans_closure and FunctionContext::new.

8 years agomir: print the scope and span for variables.
Eduard Burtescu [Tue, 5 Apr 2016 04:19:47 +0000 (07:19 +0300)]
mir: print the scope and span for variables.

8 years agoDo not encode name when encoding DefKey
Seo Sanghyeon [Mon, 11 Apr 2016 16:35:26 +0000 (01:35 +0900)]
Do not encode name when encoding DefKey