]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #34540 - jupp0r:patch-1, r=steveklabnik
bors [Sun, 3 Jul 2016 17:39:53 +0000 (10:39 -0700)]
Auto merge of #34540 - jupp0r:patch-1, r=steveklabnik

Improve code example for try!

This change improves the code example for try!,
avoiding to use try! in the example code that shows
what code constructs try! can replace.

8 years agoAuto merge of #34532 - jonmarkprice:master, r=steveklabnik
bors [Sun, 3 Jul 2016 14:47:36 +0000 (07:47 -0700)]
Auto merge of #34532 - jonmarkprice:master, r=steveklabnik

Book: Small grammatical and stylistic edits to book

I've been reading [the book](https://doc.rust-lang.org/book/) and noticed a few small grammatical and stylistic issues which I've rolled into this pull request.

I'm not sure if I should do so many small, unrelated edits in a single pull request but it seems like a lot of overhead for each small edit. Maybe one commit per edit but one pull request per file/section? Feedback is very much appreciated as this is my first pull request ever!

r? @steveklabnik rollup

8 years agoAuto merge of #34504 - retep998:patch-1, r=alexcrichton
bors [Sun, 3 Jul 2016 12:02:51 +0000 (05:02 -0700)]
Auto merge of #34504 - retep998:patch-1, r=alexcrichton

Instructions on how to build Rust with rustbuild

This is a much simpler option for those on Windows who use msvc.

8 years agoAuto merge of #34614 - cynicaldevil:build-time, r=alexcrichton
bors [Sun, 3 Jul 2016 09:17:58 +0000 (02:17 -0700)]
Auto merge of #34614 - cynicaldevil:build-time, r=alexcrichton

Build: Shows total time taken to build the compiler

Fixes #34600
Prints the total time taken to build rustc by executing `src/bootstrap/bootstrap.py`; also includes time taken to download `stage0` compiler and deps.

r? @alexcrichton

8 years agoAuto merge of #34597 - CensoredUsername:bootstrap-fix, r=alexcrichton
bors [Sun, 3 Jul 2016 06:33:54 +0000 (23:33 -0700)]
Auto merge of #34597 - CensoredUsername:bootstrap-fix, r=alexcrichton

Support more python 2.7 versions in bootstrap.py

It seems python broke compatability between 2.7.9  and 2.7.12 as on the former a WindowsError was raised while on the latter a subprocess.CalledProcessError was raised while testing for the existence of uname.

As a WindowsError being thrown obviously indicates we're running on windows, this should probably be accepted too.

8 years agoAuto merge of #34591 - brson:relnotes, r=alexcrichton
bors [Sun, 3 Jul 2016 03:09:13 +0000 (20:09 -0700)]
Auto merge of #34591 - brson:relnotes, r=alexcrichton

Release notes for 1.10.0

[Rundered](https://github.com/brson/rust/tree/relnotes/RELEASES.md).

To me highlights look like panic hooks, unix sockets, cargo, and usability improvements.

f? @rust-lang/core @rust-lang/lang @rust-lang/compiler @rust-lang/tools @bstrie

8 years agoAuto merge of #34580 - eddyb:two-steps-forward-one-step-backwards, r=nagisa
bors [Sun, 3 Jul 2016 00:25:05 +0000 (17:25 -0700)]
Auto merge of #34580 - eddyb:two-steps-forward-one-step-backwards, r=nagisa

Revert "Remove the return_address intrinsic."

This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19.

Servo might want this merged if they don't merge servo/servo#11872 soon.

cc @pnkfelix @jdm

8 years agoAuto merge of #34605 - arielb1:bug-in-the-jungle, r=eddyb
bors [Sat, 2 Jul 2016 19:25:29 +0000 (12:25 -0700)]
Auto merge of #34605 - arielb1:bug-in-the-jungle, r=eddyb

fail obligations that depend on erroring obligations

Fix a bug where an obligation that depend on an erroring obligation would
be regarded as successful, leading to global cache pollution and random
lossage.

Fixes #33723.
Fixes #34503.

r? @eddyb since @nikomatsakis is on vacation

beta-nominating because of the massive lossage potential (e.g. with `Copy` this could lead to random memory leaks), plus this is a regression.

8 years agoAuto merge of #34443 - eddyb:sized-matters, r=arielb1
bors [Sat, 2 Jul 2016 16:36:52 +0000 (09:36 -0700)]
Auto merge of #34443 - eddyb:sized-matters, r=arielb1

Disallow constants and statics from having unsized types.

This is a `[breaking-change]` which fixes #34390 by banning unsized `const` and `static`, e.g.:
```rust
const A: [i32] = *(&[0, 1, 2] as &[i32]);
static B: str = *"foo";
```

This was not intentionally allowed, and other than for `static` since some versions ago, it ICE'd.
If you've been taking advantage of this with `static`, you should be able to just use references instead.

8 years agoBuild: Shows total time taken to build the compiler
Nikhil Shagrithaya [Sat, 2 Jul 2016 14:19:27 +0000 (19:49 +0530)]
Build: Shows total time taken to build the compiler

8 years agoAuto merge of #34539 - arielb1:metadata-hash, r=alexcrichton
bors [Sat, 2 Jul 2016 13:50:59 +0000 (06:50 -0700)]
Auto merge of #34539 - arielb1:metadata-hash, r=alexcrichton

Make the metadata lock more robust

Fixes #33778 and friends.

I also needed to add a metadata encoding version to rlibs, as they did not have it before. To keep it backwards-compatible, I added 4 zeroes to the start of the metadata, which are treated as an empty length field by older rustcs.

r? @alexcrichton

8 years agofix test fallout
Ariel Ben-Yehuda [Sat, 2 Jul 2016 11:50:36 +0000 (14:50 +0300)]
fix test fallout

8 years agoadd a encoding version to the actual metadata
Ariel Ben-Yehuda [Sat, 2 Jul 2016 11:41:31 +0000 (14:41 +0300)]
add a encoding version to the actual metadata

previously, only .so files included a metadata encoding version, *outside*
of the zlib compressed area. This adds an encoding version inside the metadata
itself, in both .so and .rlib files.

Fixes #33778.

8 years agomake the metadata lock more robust and bump the metadata encoding version
Ariel Ben-Yehuda [Fri, 1 Jul 2016 21:36:33 +0000 (00:36 +0300)]
make the metadata lock more robust and bump the metadata encoding version

check the metadata lock when loading rather than afterwards

Fixes #33733
Fixes #33015

8 years agoInstructions on how to build Rust with rustbuild
Peter Atashian [Mon, 27 Jun 2016 17:51:27 +0000 (13:51 -0400)]
Instructions on how to build Rust with rustbuild

This is a much simpler option for those on Windows who use msvc.

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years agoAuto merge of #34611 - Manishearth:rollup, r=Manishearth
bors [Sat, 2 Jul 2016 10:18:59 +0000 (03:18 -0700)]
Auto merge of #34611 - Manishearth:rollup, r=Manishearth

Rollup of 7 pull requests

- Successful merges: #34531, #34545, #34551, #34566, #34567, #34574, #34583
- Failed merges:

8 years agoRollup merge of #34583 - steveklabnik:remove-unneeded-deprecated, r=alexcrichton
Manish Goregaokar [Sat, 2 Jul 2016 10:16:50 +0000 (15:46 +0530)]
Rollup merge of #34583 - steveklabnik:remove-unneeded-deprecated, r=alexcrichton

remove unneeded allow flag

There isn't anything deprecated being used in this function.

This built fine for me locally, but just to be sure, should check Travis.

8 years agoRollup merge of #34574 - jviide:patch-1, r=alexcrichton
Manish Goregaokar [Sat, 2 Jul 2016 10:16:50 +0000 (15:46 +0530)]
Rollup merge of #34574 - jviide:patch-1, r=alexcrichton

Fix README.md command consistency

The `./configure` command in README.md's Building Documentation section was missing the `$` prefix. Add the prefix to be consistent with other commands in the document.

8 years agoRollup merge of #34567 - alexcrichton:rustbuild-android, r=brson
Manish Goregaokar [Sat, 2 Jul 2016 10:16:50 +0000 (15:46 +0530)]
Rollup merge of #34567 - alexcrichton:rustbuild-android, r=brson

rustbuild: Implement testing for Android

This commit enhances the rustbuild support for testing Android to the same level
of parity as the makefiles. This involved:

* A new step to copy the standard library and other shared objects to the
  emulator. This is injected as a dependency of all test suites for Android.
* Appropriate arguments are now passed through to compiletest to ensure that it
  can run tests.
* When testing the standard library the test executables are probed for and
  shipped to the emulator to run for each test.
* Fixing compilation of compiler-rt a bit

All support added here is modeled after what's found in the makefiles, just
translating one strategy to another. As an added bonus this commit adds support
for the "check" step to automatically run tests for all targets, and the
"check-target" step now runs all tests for a particular target, automatically
filtering the tests if the target is detected as a cross-compile.

Note that we don't (and probably won't) have a bot which is actually going to
exercise any of this just yet, but all tests have passed locally for me at
least.

8 years agoRollup merge of #34566 - ollie27:linkchecker_invalid_urls, r=alexcrichton
Manish Goregaokar [Sat, 2 Jul 2016 10:16:49 +0000 (15:46 +0530)]
Rollup merge of #34566 - ollie27:linkchecker_invalid_urls, r=alexcrichton

Reject invalid urls in linkchecker

For example root-relative links will now be rejected.

Also remove some exceptions which have since been fixed and fix a typo in
the broken redirect handling.

8 years agoRollup merge of #34551 - GuillaumeGomez:runtest_improvement, r=alexcrichton
Manish Goregaokar [Sat, 2 Jul 2016 10:16:49 +0000 (15:46 +0530)]
Rollup merge of #34551 - GuillaumeGomez:runtest_improvement, r=alexcrichton

Improve runtest output

8 years agoRollup merge of #34545 - sanxiyn:rustbuild, r=alexcrichton
Manish Goregaokar [Sat, 2 Jul 2016 10:16:49 +0000 (15:46 +0530)]
Rollup merge of #34545 - sanxiyn:rustbuild, r=alexcrichton

Add rustc-stageN targets to rustbuild

8 years agoRollup merge of #34531 - GuillaumeGomez:libsyntax_err_codes, r=jonathandturner
Manish Goregaokar [Sat, 2 Jul 2016 10:16:49 +0000 (15:46 +0530)]
Rollup merge of #34531 - GuillaumeGomez:libsyntax_err_codes, r=jonathandturner

Add error codes in libsyntax

r? @jonathandturner

Fixes #34526

8 years agoAuto merge of #34515 - alexcrichton:more-checks, r=brson
bors [Sat, 2 Jul 2016 07:29:06 +0000 (00:29 -0700)]
Auto merge of #34515 - alexcrichton:more-checks, r=brson

configure: Check for valid Python on MinGW as well

The LLVM build system is somewhat picky about which Python is used to build it
as it's known to be incompatible with the default `python2` package that ships
with MinGW. This was previously detected for MSVC builds but the logic was left
out for MinGW by accident (now that we've switched to cmake builds for LLVM
everywhere).

This corrects the `./configure` check and also updates the `README.md`
accordingly. Additionally, a number of instructions were updated to work with
the most recent copy of MSYS2.

Closes https://github.com/rust-lang/rust/issues/28260
Closes #34489

8 years agoAuto merge of #34492 - retep998:please-be-robust-already, r=alexcrichton
bors [Sat, 2 Jul 2016 04:39:16 +0000 (21:39 -0700)]
Auto merge of #34492 - retep998:please-be-robust-already, r=alexcrichton

Make MSVC detection ludicrously robust

Resurrection of https://github.com/rust-lang/rust/pull/31158

r? @alexcrichton

8 years agoAuto merge of #34067 - tbu-:pr_lookup_host_ignore_other_addresses, r=alexcrichton
bors [Sat, 2 Jul 2016 01:43:28 +0000 (18:43 -0700)]
Auto merge of #34067 - tbu-:pr_lookup_host_ignore_other_addresses, r=alexcrichton

Ignore unknown address types when looking up hosts

Previously, any function using a `ToSocketAddrs` input would fail if
passed a hostname that resolves to an address type different from the
ones recognized by Rust.

This also changes the `LookupHost` iterator to only include the known
address types, as a result, it doesn't have to return `Result`s any
more, which are likely misinterpreted as failed name lookups.

8 years agofail obligations that depend on erroring obligations
Ariel Ben-Yehuda [Fri, 1 Jul 2016 23:11:00 +0000 (02:11 +0300)]
fail obligations that depend on erroring obligations

Fix a bug where an obligation that depend on an erroring obligation would
be regarded as successful, leading to global cache pollution and random
lossage.

Fixes #33723.
Fixes #34503.

8 years agoAuto merge of #33940 - seanmonstar:siphash-1-3, r=alexcrichton
bors [Fri, 1 Jul 2016 22:53:07 +0000 (15:53 -0700)]
Auto merge of #33940 - seanmonstar:siphash-1-3, r=alexcrichton

hashmap: use siphash-1-3 as default hasher

Also exposes `SipHash13` and `SipHash24` in `core::hash::sip`, for those that want to differentiate.

For motivation, see this quote from the original issue:

> we proposed SipHash-2-4 as a (strong) PRF/MAC, and so far no attack whatsoever has been found,
although many competent people tried to break it. However, fewer rounds may be sufficient and I would
be very surprised if SipHash-1-3 introduced weaknesses for hash tables.

This keeps a type alias of `SipHasher` to `SipHash24`, and since the internal default hasher of HashMap is specified as "not specified", changing it should not be a breaking change.

Closes #29754

8 years agofix RUST_LOG, hopefully for real this time
Ariel Ben-Yehuda [Fri, 1 Jul 2016 20:51:48 +0000 (23:51 +0300)]
fix RUST_LOG, hopefully for real this time

8 years agoRelease notes for 1.10.0
Brian Anderson [Thu, 30 Jun 2016 22:47:32 +0000 (15:47 -0700)]
Release notes for 1.10.0

8 years agoAuto merge of #34578 - alexcrichton:lets-just-keep-trying-to-fix-the-nightlies, r...
bors [Fri, 1 Jul 2016 19:51:59 +0000 (12:51 -0700)]
Auto merge of #34578 - alexcrichton:lets-just-keep-trying-to-fix-the-nightlies, r=brson

mk: Request -march=i686 on i686 Linux

Apparently the gcc on our dist bot is so old and/or obscure that the default
`-m32` switch doesn't think it can generate i686 code (or something like that).
The compiler-rt build system probes for the `__i686__` define in GCC to compile
for an i686 (vs i386) target, so this was failing on the bots.

This tweaks instead to pass `-march=i686` on i686-unknown-linux-gnu to C code to
ensure that we're compiling for i686 instead of i386. This should hopefully not
actually have an impact other than maybe doing some random optimization it
wasn't able to do so before. In theory this isn't making the target less
compatible as all Rust code is already compiled for i686.

Hopefully closes #34572

8 years agoOlder versions of python 2.7 can raise a WindowsError instead of a subprocess.CalledP...
CensoredUsername [Fri, 1 Jul 2016 16:22:24 +0000 (18:22 +0200)]
Older versions of python 2.7 can raise a WindowsError instead of a subprocess.CalledProcessError when `uname` does not exist

8 years agoAuto merge of #34563 - alexcrichton:robust-mk, r=brson
bors [Fri, 1 Jul 2016 06:30:51 +0000 (23:30 -0700)]
Auto merge of #34563 - alexcrichton:robust-mk, r=brson

mk: Don't consider LLVM done until it's done

Currently if an LLVM build is interrupted *after* it creates the llvm-config
binary but before it's done it puts us in an inconsistent state where we think
LLVM is compiled but it's not actually. This tweaks our logic to only consider
LLVM done building once it's actually done building.

This should hopefully alleviate problems on the bots where if we interrupt at
the wrong time it doesn't corrupt the build directory.

8 years agoAuto merge of #34577 - alexcrichton:clean-more-yet-again, r=brson
bors [Fri, 1 Jul 2016 03:07:57 +0000 (20:07 -0700)]
Auto merge of #34577 - alexcrichton:clean-more-yet-again, r=brson

rustbuild: Clean out tmp directory on `make clean`

Right now we generate error index information into this directory, but it's
never cleaned out. This means that if a build *bounces* because of something in
this directory it'll continue to cause all future builds to fail because the
relevant files are never removed.

8 years agorustbuild: Clean out tmp directory on `make clean`
Alex Crichton [Thu, 30 Jun 2016 16:01:27 +0000 (09:01 -0700)]
rustbuild: Clean out tmp directory on `make clean`

Right now we generate error index information into this directory, but it's
never cleaned out. This means that if a build *bounces* because of something in
this directory it'll continue to cause all future builds to fail because the
relevant files are never removed.

8 years agoremove unneeded allow flag
Steve Klabnik [Thu, 30 Jun 2016 21:06:52 +0000 (17:06 -0400)]
remove unneeded allow flag

There isn't anything deprecated being used in this function.

8 years agoRevert "Remove the return_address intrinsic."
Eduard Burtescu [Thu, 30 Jun 2016 18:12:36 +0000 (21:12 +0300)]
Revert "Remove the return_address intrinsic."

This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19.

8 years agomk: Request -march=i686 on i686 Linux
Alex Crichton [Thu, 30 Jun 2016 17:25:46 +0000 (10:25 -0700)]
mk: Request -march=i686 on i686 Linux

Apparently the gcc on our dist bot is so old and/or obscure that the default
`-m32` switch doesn't think it can generate i686 code (or something like that).
The compiler-rt build system probes for the `__i686__` define in GCC to compile
for an i686 (vs i386) target, so this was failing on the bots.

This tweaks instead to pass `-march=i686` on i686-unknown-linux-gnu to C code to
ensure that we're compiling for i686 instead of i386. This should hopefully not
actually have an impact other than maybe doing some random optimization it
wasn't able to do so before. In theory this isn't making the target less
compatible as all Rust code is already compiled for i686.

Hopefully closes #34572

8 years agomk: Don't consider LLVM done until it's done
Alex Crichton [Wed, 29 Jun 2016 20:45:18 +0000 (13:45 -0700)]
mk: Don't consider LLVM done until it's done

Currently if an LLVM build is interrupted *after* it creates the llvm-config
binary but before it's done it puts us in an inconsistent state where we think
LLVM is compiled but it's not actually. This tweaks our logic to only consider
LLVM done building once it's actually done building.

This should hopefully alleviate problems on the bots where if we interrupt at
the wrong time it doesn't corrupt the build directory.

8 years agoImprove runtest output
ggomez [Wed, 29 Jun 2016 15:25:35 +0000 (17:25 +0200)]
Improve runtest output

It now prints only unexpected errors and expected errors which weren't found

8 years agoFix README.md command consistency
Joachim Viide [Thu, 30 Jun 2016 13:15:17 +0000 (16:15 +0300)]
Fix README.md command consistency

The ./configure command in README.md's Building Documentation section was
missing the $ prefix. Add the prefix to be consistent with other commands in the
document.

8 years agoAdd comments on error code list
Guillaume Gomez [Wed, 29 Jun 2016 20:10:20 +0000 (22:10 +0200)]
Add comments on error code list

8 years agoAuto merge of #34541 - jseyfried:rollup, r=jseyfried
bors [Thu, 30 Jun 2016 08:49:45 +0000 (01:49 -0700)]
Auto merge of #34541 - jseyfried:rollup, r=jseyfried

Rollup of 5 pull requests

 - Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547

8 years agoRollup merge of #34547 - sanxiyn:pretty-lifetime, r=pnkfelix
Jeffrey Seyfried [Thu, 30 Jun 2016 07:39:32 +0000 (07:39 +0000)]
Rollup merge of #34547 - sanxiyn:pretty-lifetime, r=pnkfelix

Fix pretty-printing of lifetime bound

Fix #34527.

8 years agoRollup merge of #34512 - CensoredUsername:configure-fixes, r=alexcrichton
Jeffrey Seyfried [Thu, 30 Jun 2016 03:40:28 +0000 (03:40 +0000)]
Rollup merge of #34512 - CensoredUsername:configure-fixes, r=alexcrichton

Support CMake installations in paths containing spaces

This solves #34490

8 years agoAuto merge of #34552 - Manishearth:rollup, r=Manishearth
bors [Thu, 30 Jun 2016 01:44:27 +0000 (18:44 -0700)]
Auto merge of #34552 - Manishearth:rollup, r=Manishearth

Rollup of 11 pull requests

- Successful merges: #34355, #34446, #34459, #34460, #34467, #34495, #34497, #34499, #34513, #34536, #34542
- Failed merges:

8 years agorustbuild: Implement testing for Android
Alex Crichton [Tue, 28 Jun 2016 20:31:30 +0000 (13:31 -0700)]
rustbuild: Implement testing for Android

This commit enhances the rustbuild support for testing Android to the same level
of parity as the makefiles. This involved:

* A new step to copy the standard library and other shared objects to the
  emulator. This is injected as a dependency of all test suites for Android.
* Appropriate arguments are now passed through to compiletest to ensure that it
  can run tests.
* When testing the standard library the test executables are probed for and
  shipped to the emulator to run for each test.
* Fixing compilation of compiler-rt a bit

All support added here is modeled after what's found in the makefiles, just
translating one strategy to another. As an added bonus this commit adds support
for the "check" step to automatically run tests for all targets, and the
"check-target" step now runs all tests for a particular target, automatically
filtering the tests if the target is detected as a cross-compile.

Note that we don't (and probably won't) have a bot which is actually going to
exercise any of this just yet, but all tests have passed locally for me at
least.

8 years agostd: use siphash-1-3 for HashMap
Sean McArthur [Tue, 21 Jun 2016 21:27:15 +0000 (14:27 -0700)]
std: use siphash-1-3 for HashMap

8 years agoAuto merge of #34553 - alexcrichton:fix-nightlies, r=brson
bors [Wed, 29 Jun 2016 23:02:34 +0000 (16:02 -0700)]
Auto merge of #34553 - alexcrichton:fix-nightlies, r=brson

configure: Fix cross-compiling LLVM for realz

Actually got it working this time, and it was again just a problem specifying
the llvm-tblgen binary. We need to point it at the $CFG_BUILD target's tblgen
and then we also needed to correct the path a bit.

8 years agoReject invalid urls in linkchecker
Oliver Middleton [Wed, 29 Jun 2016 21:58:57 +0000 (22:58 +0100)]
Reject invalid urls in linkchecker

For example root-relative links will now be rejected.

Also remove some exceptions which have since been fixed and fix a typo in
the broken redirect handling.

8 years agoFix tests
ggomez [Wed, 29 Jun 2016 15:23:51 +0000 (17:23 +0200)]
Fix tests

8 years agoconfigure: Fix cross-compiling LLVM for realz
Alex Crichton [Wed, 29 Jun 2016 16:05:18 +0000 (09:05 -0700)]
configure: Fix cross-compiling LLVM for realz

Actually got it working this time, and it was again just a problem specifying
the llvm-tblgen binary. We need to point it at the $CFG_BUILD target's tblgen
and then we also needed to correct the path a bit.

8 years agoRollup merge of #34542 - jseyfried:fix_recursive_modules, r=nrc
Manish Goregaokar [Wed, 29 Jun 2016 15:51:24 +0000 (21:21 +0530)]
Rollup merge of #34542 - jseyfried:fix_recursive_modules, r=nrc

Fix non-termination on recursive module re-exports in extern crates

Fixes #33776.
r? @nrc

8 years agoRollup merge of #34536 - ollie27:rustdoc_module_impls, r=alexcrichton
Manish Goregaokar [Wed, 29 Jun 2016 15:51:23 +0000 (21:21 +0530)]
Rollup merge of #34536 - ollie27:rustdoc_module_impls, r=alexcrichton

rustdoc: Fix empty Implementations section on some module pages

These are caused by `DefaultImpl`s.

For example [`core::marker`](https://doc.rust-lang.org/nightly/core/marker/#impls).

8 years agoRollup merge of #34513 - ollie27:rustdoc_stripped, r=alexcrichton
Manish Goregaokar [Wed, 29 Jun 2016 15:51:23 +0000 (21:21 +0530)]
Rollup merge of #34513 - ollie27:rustdoc_stripped, r=alexcrichton

rustdoc: Fix a few stripping issues

We need to recurse into stripped modules to strip things like impl methods
but when doing so we must not add any items to the `retained` set.

For example this removes [`core::num::ParseFloatError::__description`](https://doc.rust-lang.org/nightly/core/num/struct.ParseFloatError.html#method.__description) and [`impl Clone for ThreadRng`](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html).

8 years agoRollup merge of #34499 - michaelwoerister:lldb-blacklist, r=alexcrichton
Manish Goregaokar [Wed, 29 Jun 2016 15:51:23 +0000 (21:21 +0530)]
Rollup merge of #34499 - michaelwoerister:lldb-blacklist, r=alexcrichton

Disable debuginfo tests for a given blacklist of LLDB versions

Anyone having trouble with most LLDB tests failing on OSX, please report your LLDB version here so I can add it to the blacklist.

Blacklisted versions so far:
* lldb-350.*

cc @rust-lang/tools
cc @tedhorst @indutny @jonathandturner (people from the original bug report)

Fixes #32520.

8 years agoRollup merge of #34497 - oli-obk:double_negation, r=eddyb
Manish Goregaokar [Wed, 29 Jun 2016 15:51:22 +0000 (21:21 +0530)]
Rollup merge of #34497 - oli-obk:double_negation, r=eddyb

Revert "skip double negation in const eval"

This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8.

fixes #34395

The original commit was based on a mis-understanding of the overflowing literal lint.

This needs to be ported to beta.

r? @eddyb

8 years agoRollup merge of #34495 - jseyfried:only_ident_macro_invocations, r=eddyb
Manish Goregaokar [Wed, 29 Jun 2016 15:51:22 +0000 (21:21 +0530)]
Rollup merge of #34495 - jseyfried:only_ident_macro_invocations, r=eddyb

Forbid type parameters and global paths in macro invocations

Fixes #28558.
This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => { () } }
fn main() {
    m::<T>!(); // Type parameters are no longer allowed in macro invocations
    ::m!(); // Global paths are no longer allowed in macro invocations
}
```
Any breakage can be fixed by removing the type parameters or the leading `::` (respectively).

r? @eddyb

8 years agoRollup merge of #34467 - GuillaumeGomez:err-codes, r=brson
Manish Goregaokar [Wed, 29 Jun 2016 15:51:22 +0000 (21:21 +0530)]
Rollup merge of #34467 - GuillaumeGomez:err-codes, r=brson

Add new error codes and improve some explanations

r? @brson

cc @steveklabnik
cc @jonathandturner

8 years agoRollup merge of #34460 - dsprenkels:issue-33455, r=alexcrichton
Manish Goregaokar [Wed, 29 Jun 2016 15:51:21 +0000 (21:21 +0530)]
Rollup merge of #34460 - dsprenkels:issue-33455, r=alexcrichton

Add regression test for #33455

Closes #33455.

8 years agoRollup merge of #34459 - jseyfried:expansion_cleanup, r=nrc
Manish Goregaokar [Wed, 29 Jun 2016 15:51:21 +0000 (21:21 +0530)]
Rollup merge of #34459 - jseyfried:expansion_cleanup, r=nrc

Miscellaneous macro expansion cleanup and groundwork

r? @nrc

8 years agoRollup merge of #34446 - jseyfried:refactor_decorators, r=nrc
Manish Goregaokar [Wed, 29 Jun 2016 15:51:21 +0000 (21:21 +0530)]
Rollup merge of #34446 - jseyfried:refactor_decorators, r=nrc

Treat `MultiDecorator`s as a special case of `MultiModifier`s

This deals with #32950 by using @durka's [option 1](https://github.com/rust-lang/rust/pull/33769#issuecomment-221774136).
r? @nrc

8 years agoRollup merge of #34355 - jseyfried:paren_expression_ids_nonunique, r=nrc
Manish Goregaokar [Wed, 29 Jun 2016 15:51:21 +0000 (21:21 +0530)]
Rollup merge of #34355 - jseyfried:paren_expression_ids_nonunique, r=nrc

Give `ast::ExprKind::Paren` no-op expressions the same ids as their children.

Having `ast::ExprKind::Paren` expressions share ids with their children
 - reduces the number of unused `NodeId`s in the hir map and
 - guarantees that `tcx.map.expect_expr(ast_expr.id)` is the hir corresponding to `ast_expr`.

This fixes the bug from #34327, which was introduced in #33296 when I assumed the above guarantee.

r? @nrc

8 years agoFix pretty-printing of lifetime bound
Seo Sanghyeon [Wed, 29 Jun 2016 12:53:01 +0000 (21:53 +0900)]
Fix pretty-printing of lifetime bound

8 years agoAdd error codes in libsyntax
ggomez [Tue, 28 Jun 2016 17:40:40 +0000 (19:40 +0200)]
Add error codes in libsyntax

8 years agoGive `ast::ExprKind::Paren` no-op expressions the same node ids as their children.
Jeffrey Seyfried [Sun, 19 Jun 2016 02:00:11 +0000 (02:00 +0000)]
Give `ast::ExprKind::Paren` no-op expressions the same node ids as their children.

8 years agoUpdate documentation to reflect ignoring of unknown addresses
Tobias Bucher [Wed, 29 Jun 2016 09:44:33 +0000 (11:44 +0200)]
Update documentation to reflect ignoring of unknown addresses

8 years agoConvert a simple tail call to a loop
Tobias Bucher [Sat, 4 Jun 2016 18:09:19 +0000 (20:09 +0200)]
Convert a simple tail call to a loop

8 years agoIgnore unknown address types when looking up hosts
Tobias Bucher [Fri, 3 Jun 2016 21:10:36 +0000 (23:10 +0200)]
Ignore unknown address types when looking up hosts

Previously, any function using a `ToSocketAddrs` input would fail if
passed a hostname that resolves to an address type different from the
ones recognized by Rust.

This also changes the `LookupHost` iterator to only include the known
address types, as a result, it doesn't have to return `Result`s any
more, which are likely misinterpreted as failed name lookups.

8 years agoAdd rustc-stageN targets to rustbuild
Seo Sanghyeon [Wed, 29 Jun 2016 08:37:56 +0000 (17:37 +0900)]
Add rustc-stageN targets to rustbuild

8 years agoRefactor away `parser.commit_stmt_expecting()`
Jeffrey Seyfried [Wed, 29 Jun 2016 06:40:05 +0000 (06:40 +0000)]
Refactor away `parser.commit_stmt_expecting()`

8 years agoTreat `MultiDecorator`s as a special case of `MultiModifier`s
Jeffrey Seyfried [Fri, 24 Jun 2016 03:25:37 +0000 (03:25 +0000)]
Treat `MultiDecorator`s as a special case of `MultiModifier`s

8 years agoDisallow `derive` on items with type macros
Jeffrey Seyfried [Fri, 24 Jun 2016 03:23:44 +0000 (03:23 +0000)]
Disallow `derive` on items with type macros

8 years agoRollup merge of #34305 - Aaronepower:master, r=alexcrichton
Jeffrey Seyfried [Wed, 29 Jun 2016 00:39:49 +0000 (00:39 +0000)]
Rollup merge of #34305 - Aaronepower:master, r=alexcrichton

Added Default trait for Cow.

Adds a default implementation for Cow. Which is the Owned's default.

8 years agoRollup merge of #34105 - ollie27:rustdoc_derived, r=alexcrichton
Jeffrey Seyfried [Wed, 29 Jun 2016 00:33:10 +0000 (00:33 +0000)]
Rollup merge of #34105 - ollie27:rustdoc_derived, r=alexcrichton

rustdoc: Remove Derived Implementations title

As far as I know whether a trait was derived or not does not change the
public API so there is no need to include this information in the docs.

This title currently just adds an extra divide in the list of trait
implementations which I don't think needs to be there.

8 years agoAdd regression test
Jeffrey Seyfried [Wed, 29 Jun 2016 00:18:07 +0000 (00:18 +0000)]
Add regression test

8 years agoImprove code example for try!
Jupp Müller [Tue, 28 Jun 2016 23:13:03 +0000 (01:13 +0200)]
Improve code example for try!

This change improves the code example for try!,
avoiding to use try! in the example code that shows
what code constructs try! can replace.

8 years agoFix infinite loop on recursive module exports in an extern crate
Jeffrey Seyfried [Tue, 28 Jun 2016 23:03:56 +0000 (23:03 +0000)]
Fix infinite loop on recursive module exports in an extern crate

8 years agorustdoc: Fix empty Implementations section on some module pages
Oliver Middleton [Tue, 28 Jun 2016 21:50:44 +0000 (22:50 +0100)]
rustdoc: Fix empty Implementations section on some module pages

These are caused by `DefaultImpl`s.

8 years agorefactor rustc_metadata to use CamelCase names and IndexVec
Ariel Ben-Yehuda [Tue, 28 Jun 2016 20:41:09 +0000 (23:41 +0300)]
refactor rustc_metadata to use CamelCase names and IndexVec

8 years agoMake MSVC detection ludicrously robust
Peter Atashian [Tue, 28 Jun 2016 20:29:58 +0000 (16:29 -0400)]
Make MSVC detection ludicrously robust
Should fix a few more edge cases

Fixes https://github.com/rust-lang/rust/issues/31151
Fixes https://github.com/rust-lang/rust/issues/32159
Fixes https://github.com/rust-lang/rust/issues/34484
Improves https://github.com/rust-lang/rust-packaging/issues/50

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years agoused curly instead of straight quotes
Jonathan Price [Tue, 28 Jun 2016 19:09:32 +0000 (14:09 -0500)]
used curly instead of straight quotes

8 years agoAuto merge of #34519 - alexcrichton:fix-nightlies, r=brson
bors [Tue, 28 Jun 2016 18:52:36 +0000 (11:52 -0700)]
Auto merge of #34519 - alexcrichton:fix-nightlies, r=brson

Try to fix the nightlies

They look to be failing right after the CMake PR landed. I've diagnosed and confirmed the first issue fixed, the second is a bit of a shot in the dark to see if it fixes things.

8 years agoMerging my book edits recent commits.
Jonathan Price [Tue, 28 Jun 2016 18:06:15 +0000 (13:06 -0500)]
Merging my book edits recent commits.

8 years agotook comment out of code block
Jonathan Price [Tue, 28 Jun 2016 16:39:24 +0000 (11:39 -0500)]
took comment out of code block

no reason for a long comment in a code block when we could take it out, especially since it looks like it's using markdown (`struct`, `&` and `lvl`).

8 years agofixed typo: term should be terms
Jonathan Price [Tue, 28 Jun 2016 15:49:37 +0000 (10:49 -0500)]
fixed typo: term should be terms

two terms (input lifetime and output lifetime) so "term" needs to be plural.

8 years agoAuto merge of #34525 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Tue, 28 Jun 2016 14:48:56 +0000 (07:48 -0700)]
Auto merge of #34525 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 13 pull requests

- Successful merges: #34080, #34287, #34328, #34406, #34415, #34442, #34462, #34471, #34475, #34479, #34517, #34518, #34524
- Failed merges: #33951

8 years agoRollup merge of #34524 - frewsxcv:std-io-sink, r=GuillaumeGomez
Guillaume Gomez [Tue, 28 Jun 2016 14:05:16 +0000 (16:05 +0200)]
Rollup merge of #34524 - frewsxcv:std-io-sink, r=GuillaumeGomez

Add doc example for `std::io::sink`.

None

8 years agoRollup merge of #34518 - frewsxcv:io-repeat, r=GuillaumeGomez
Guillaume Gomez [Tue, 28 Jun 2016 14:05:16 +0000 (16:05 +0200)]
Rollup merge of #34518 - frewsxcv:io-repeat, r=GuillaumeGomez

Add doc example for `std::io::repeat`.

None

8 years agoRollup merge of #34517 - frewsxcv:empty, r=GuillaumeGomez
Guillaume Gomez [Tue, 28 Jun 2016 14:05:16 +0000 (16:05 +0200)]
Rollup merge of #34517 - frewsxcv:empty, r=GuillaumeGomez

Minor rewrite of `std::io::empty` doc example.

None

8 years agoRollup merge of #34479 - ollie27:rustdoc_renamed_reexport_list, r=GuillaumeGomez
Guillaume Gomez [Tue, 28 Jun 2016 14:05:15 +0000 (16:05 +0200)]
Rollup merge of #34479 - ollie27:rustdoc_renamed_reexport_list, r=GuillaumeGomez

rustdoc: Fix inlined renamed reexports in import lists

Fixes #34473

8 years agoRollup merge of #34475 - frewsxcv:path-component, r=GuillaumeGomez
Guillaume Gomez [Tue, 28 Jun 2016 14:05:15 +0000 (16:05 +0200)]
Rollup merge of #34475 - frewsxcv:path-component, r=GuillaumeGomez

Expand `std::path::Component` documentation.

Indicate how it gets created and add an example.

8 years agoRollup merge of #34471 - GuillaumeGomez:fix_expl, r=steveklabnik
Guillaume Gomez [Tue, 28 Jun 2016 14:05:15 +0000 (16:05 +0200)]
Rollup merge of #34471 - GuillaumeGomez:fix_expl, r=steveklabnik

Fix E0269 error explanation

r? @steveklabnik

8 years agoRollup merge of #34462 - dns2utf8:leading_zeros, r=GuillaumeGomez
Guillaume Gomez [Tue, 28 Jun 2016 14:05:15 +0000 (16:05 +0200)]
Rollup merge of #34462 - dns2utf8:leading_zeros, r=GuillaumeGomez

Add example with leading zeros

I was searching for this format very long. So I added an example to the prominent section.

I was thinking of putting the keyword leading in the corresponding section as well, what do you think?

r? @steveklabnik

8 years agoRollup merge of #34442 - tatsuya6502:doc-book-ownership, r=steveklabnik
Guillaume Gomez [Tue, 28 Jun 2016 14:05:14 +0000 (16:05 +0200)]
Rollup merge of #34442 - tatsuya6502:doc-book-ownership, r=steveklabnik

[doc] Fix links in Ownership section of the book

- Add a missing link definition for `[i32]`.
- Like `[stack]` link is pointing to `...#the-stack`, append `#the-heap` to `[heap]` link.

8 years agoRollup merge of #34415 - ollie27:docs_float, r=steveklabnik
Guillaume Gomez [Tue, 28 Jun 2016 14:05:14 +0000 (16:05 +0200)]
Rollup merge of #34415 - ollie27:docs_float, r=steveklabnik

Use the correct types in float examples

r? @steveklabnik

8 years agoRollup merge of #34406 - frewsxcv:sleep-ex, r=alexcrichton
Guillaume Gomez [Tue, 28 Jun 2016 14:05:14 +0000 (16:05 +0200)]
Rollup merge of #34406 - frewsxcv:sleep-ex, r=alexcrichton

Add example for `std::thread::sleep`.

None

8 years agoRollup merge of #34328 - wuranbo:patch-1, r=steveklabnik
Guillaume Gomez [Tue, 28 Jun 2016 14:05:13 +0000 (16:05 +0200)]
Rollup merge of #34328 - wuranbo:patch-1, r=steveklabnik

Traits where syntax's extra usage example more clearly

r? @steveklabnik

8 years agoRollup merge of #34287 - durka:patch-26, r=steveklabnik
Guillaume Gomez [Tue, 28 Jun 2016 14:05:13 +0000 (16:05 +0200)]
Rollup merge of #34287 - durka:patch-26, r=steveklabnik

update reference for #29734

8 years agoRollup merge of #34080 - royalstream:royalstream-book-june4, r=steveklabnik
Guillaume Gomez [Tue, 28 Jun 2016 14:05:12 +0000 (16:05 +0200)]
Rollup merge of #34080 - royalstream:royalstream-book-june4, r=steveklabnik

Syntax coloring and more compact diagram

Two cosmetic improvements:
- New content was added a few days ago to the **Closures** chapter but it was missing rust's syntax coloring.
- Also, in the **Crates and Modules** chapter, a diagram was improved to be more symmetric and to take less space.