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

8 years agoAdd doc example for `std::io::sink`.
Corey Farwell [Tue, 28 Jun 2016 12:22:34 +0000 (08:22 -0400)]
Add doc example for `std::io::sink`.

8 years agogroundwork: create the `Resolver` earlier in phase 2
Jeffrey Seyfried [Wed, 22 Jun 2016 01:55:42 +0000 (01:55 +0000)]
groundwork: create the `Resolver` earlier in phase 2

8 years agogroundwork: refactor the interface that `resolve` exposes to `driver`
Jeffrey Seyfried [Wed, 22 Jun 2016 01:54:34 +0000 (01:54 +0000)]
groundwork: refactor the interface that `resolve` exposes to `driver`

8 years agocleanup: refactor away `ast::NodeIdAssigner`
Jeffrey Seyfried [Wed, 22 Jun 2016 01:16:56 +0000 (01:16 +0000)]
cleanup: refactor away `ast::NodeIdAssigner`

8 years agogroundwork: use `resolve_identifier` instead of `resolve_path` to classify ident...
Jeffrey Seyfried [Sun, 19 Jun 2016 22:32:51 +0000 (22:32 +0000)]
groundwork: use `resolve_identifier` instead of `resolve_path` to classify ident patterns

8 years agocleanup: use `DummyResult` to implement `MacroGenerable::dummy`
Jeffrey Seyfried [Fri, 17 Jun 2016 11:02:42 +0000 (11:02 +0000)]
cleanup: use `DummyResult` to implement `MacroGenerable::dummy`

8 years agocleanup: don't count attributes on an item in a statement position as on the statement
Jeffrey Seyfried [Tue, 14 Jun 2016 06:48:24 +0000 (06:48 +0000)]
cleanup: don't count attributes on an item in a statement position as on the statement

8 years agoMinor rewrite of `std::io::empty` doc example.
Corey Farwell [Tue, 28 Jun 2016 01:13:26 +0000 (21:13 -0400)]
Minor rewrite of `std::io::empty` doc example.

Remove unnecessary hidden `foo` function.
Demonstrate this emptiness of the resulting string.
Combine imports.

8 years agomk: Make some LLVM building support more robust
Alex Crichton [Tue, 28 Jun 2016 01:59:55 +0000 (18:59 -0700)]
mk: Make some LLVM building support more robust

* Implement the clean-llvm target for those cases where makefiles are being used
* Have all cross-compiled LLVMs depend on the **host** LLVM as they'll require
  the llvm-tablegen executable from there

8 years agorustbuild: Update how compiler-rt is called
Alex Crichton [Tue, 28 Jun 2016 01:53:17 +0000 (18:53 -0700)]
rustbuild: Update how compiler-rt is called

Looks like compiler-rt has been tweaked slightly during the last update,
propagate these changes to rustbuild as well.

8 years agoAdd doc example for `std::io::repeat`.
Corey Farwell [Tue, 28 Jun 2016 01:23:53 +0000 (21:23 -0400)]
Add doc example for `std::io::repeat`.

8 years agoconfigure: Check for valid Python on MinGW as well
Alex Crichton [Mon, 27 Jun 2016 23:02:06 +0000 (16:02 -0700)]
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 #34489

8 years agoAuto merge of #34424 - jseyfried:breaking_batch, r=Manishearth
bors [Mon, 27 Jun 2016 23:42:03 +0000 (16:42 -0700)]
Auto merge of #34424 - jseyfried:breaking_batch, r=Manishearth

Batch up libsyntax breaking changes

Batch of the following syntax-[breaking-change] changes:
 - #34213: Add a variant `Macro` to `TraitItemKind`
 - #34368: Merge the variant `QPath` of `PatKind` into the variant `PatKind::Path`
 - #34385: Move `syntax::ast::TokenTree` into a new module `syntax::tokenstream`
 - #33943:
  - Remove the type parameter from `visit::Visitor`
  - Remove `attr::WithAttrs` -- use `attr::HasAttrs` instead.
  - Change `fold_tt`/`fold_tts` to take token trees by value and avoid wrapping token trees in `Rc`.
  - Remove the field `ctxt` of `ast::Mac_`
  - Remove inherent method `attrs()` of types -- use the method `attrs` of `HasAttrs` instead.
 - #34316:
  - Remove `ast::Decl`/`ast::DeclKind` and add variants `Local` and `Item` to `StmtKind`.
  - Move the node id for statements from the `StmtKind` variants to a field of `Stmt` (making `Stmt` a struct instead of an alias for `Spanned<StmtKind>`)
  - Rename `ast::ExprKind::Again` to `Continue`.
 - #34339: Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`
  - Use `.into()` in convert between `Vec<Attribute>` and `ThinVec<Attribute>`
  - Use autoderef instead of `.as_attr_slice()`
 - #34436: Remove the optional expression from `ast::Block` and instead use a `StmtKind::Expr` at the end of the statement list.
 - #34403: Move errors into a separate crate (unlikely to cause breakage)

8 years agoUpdate `src/rustc/Cargo.lock`
Jeffrey Seyfried [Mon, 27 Jun 2016 23:40:04 +0000 (23:40 +0000)]
Update `src/rustc/Cargo.lock`

8 years agorustdoc: Fix a few stripping issues
Oliver Middleton [Mon, 27 Jun 2016 22:10:13 +0000 (23:10 +0100)]
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.

8 years agoSupport CMake installations in paths containing spaces
CensoredUsername [Mon, 27 Jun 2016 21:39:51 +0000 (23:39 +0200)]
Support CMake installations in paths containing spaces

8 years agoDisable debuginfo tests for a given blacklist of LLDB versions
Michael Woerister [Mon, 27 Jun 2016 18:31:23 +0000 (14:31 -0400)]
Disable debuginfo tests for a given blacklist of LLDB versions

8 years agoFix `Cargo.toml`s
Jeffrey Seyfried [Mon, 27 Jun 2016 17:45:33 +0000 (17:45 +0000)]
Fix `Cargo.toml`s

8 years agoAuto merge of #34169 - scottcarr:dominator-cache, r=nikomatsakis
bors [Mon, 27 Jun 2016 18:12:25 +0000 (11:12 -0700)]
Auto merge of #34169 - scottcarr:dominator-cache, r=nikomatsakis

[MIR] Add Dominators to MIR and Add Graph Algorithms

~~This PR assumes PR #34149 lands.~~

Add generic graph algorithms to rustc_data_structures.

Add dominators and successors to the ~~cache (that currently only holds predecessors).~~ `Mir`.

8 years agoAdd example for `std::thread::sleep`.
Corey Farwell [Wed, 22 Jun 2016 01:41:02 +0000 (21:41 -0400)]
Add example for `std::thread::sleep`.