Commit Graph

63626 Commits

Author SHA1 Message Date
bors
afa1240e57 Auto merge of #41544 - alexcrichton:bump-bootstrap, r=brson
Update stage0 bootstrap compiler

We've got a freshly minted beta compiler, let's update to use that on nightly!
This has a few other changes associated with it as well

* A bump to the rustc version number (to 1.19.0)
* Movement of the `cargo` and `rls` submodules to their "proper" location in
  `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude`
  option this can work.
* Updates of the `cargo` and `rls` submodules to their master branches.
* Tweak to the `src/stage0.txt` format to be more amenable for Cargo version
  numbers. On the beta channel Cargo will bootstrap from a different version
  than rustc (e.g. the version numbers are different), so we need different
  configuration for this.
* Addition of `dev` as a readable key in the `src/stage0.txt` format. If present
  then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead
  of `static.rust-lang.org`. This is added to accomodate our updated release
  process with Travis and AppVeyor.
2017-04-29 20:38:15 +00:00
Alex Crichton
5daf557a77 Update stage0 bootstrap compiler
We've got a freshly minted beta compiler, let's update to use that on nightly!
This has a few other changes associated with it as well

* A bump to the rustc version number (to 1.19.0)
* Movement of the `cargo` and `rls` submodules to their "proper" location in
  `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude`
  option this can work.
* Updates of the `cargo` and `rls` submodules to their master branches.
* Tweak to the `src/stage0.txt` format to be more amenable for Cargo version
  numbers. On the beta channel Cargo will bootstrap from a different version
  than rustc (e.g. the version numbers are different), so we need different
  configuration for this.
* Addition of `dev` as a readable key in the `src/stage0.txt` format. If present
  then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead
  of `static.rust-lang.org`. This is added to accomodate our updated release
  process with Travis and AppVeyor.
2017-04-29 12:11:14 -07:00
bors
b4d3ed64ec Auto merge of #39291 - Freyskeyd:check_context_E0423, r=petrochenkov
Checker:: Execute levenshtein before other context checking

As explain [here]() i think it's better to check for a miss typing before checking context dependent help.

```rust
struct Handle {}

struct Something {
     handle: Handle
}

fn main() {
     let handle: Handle = Handle {};

     let s: Something = Something {
         // Checker detect an error and propose a solution with `Handle { /* ... */ }`
         // but it's a miss typing of `handle`
         handle: Handle
    };
}
```

Ping: @nagisa for #39226

Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2017-04-29 15:18:52 +00:00
bors
e326e86b47 Auto merge of #41588 - cengizIO:master, r=nikomatsakis
use diff crate for compile-fail test diagnostics #41474

Hello!

This fixes #41474

We were using a custom implementation to dump the differences between expected and actual outputs of compile-fail tests.

I removed this internal implementation and added `diff` crate as a new dependency to `compile-fail`.

Again, huge thanks to @nikomatsakis for guiding.
2017-04-29 12:59:45 +00:00
bors
12e76e24cc Auto merge of #41623 - alexcrichton:update-sccache, r=TimNN
ci: Update sccache build

Pulls in mozilla/sccache@ef0d77543 to fix #40240 again after the builds included
in #41447 forgot to include the mio fixed included in #41076.

Closes #40240
2017-04-29 08:36:57 +00:00
Alex Crichton
aa891a57a1 ci: Update sccache build
Pulls in mozilla/sccache@ef0d77543 to fix #40240 again after the builds included
in #41447 forgot to include the mio fixed included in #41076.

Closes #40240
2017-04-29 00:29:54 -07:00
bors
b9e9a03462 Auto merge of #41564 - gaurikholkar:master, r=nikomatsakis
Disable ref hint for pattern in let and adding ui tests #40402

A fix to #40402

The `to prevent move, use ref e or ref mut e ` has been disabled.
```
fn main() {
    let v = vec![String::from("oh no")];

    let e = v[0];
}
```
now gives
```
error[E0507]: cannot move out of indexed content
 --> example.rs:4:13
  |
4 |     let e = v[0];
  |             ^^^^ cannot move out of indexed content

error: aborting due to previous error
```
I have added ui tests for the same and also modified a compile-fail test.
2017-04-29 06:16:22 +00:00
bors
95467d33cb Auto merge of #41577 - Keruspe:master, r=alexcrichton
rustbuild improvements

Properly hook up cargo and rls in the build phase, and install them, when extended build is enabled.
2017-04-29 03:56:09 +00:00
bors
810ed98d08 Auto merge of #41542 - petrochenkov:objpars2, r=nikomatsakis
syntax: Parse trait object types starting with a lifetime bound

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

This was originally implemented in https://github.com/rust-lang/rust/pull/40043, then reverted, then there was some [agreement](https://github.com/rust-lang/rust/issues/39318#issuecomment-289108720) that it should be supported.
(This is hopefully the last PR related to bound parsing.)
2017-04-28 22:28:11 +00:00
bors
128aa262e8 Auto merge of #41368 - nikomatsakis:incr-comp-dep-tracking-map, r=eddyb
make *most* maps private

Currently we access the `DepTrackingMap` fields directly rather than using the query accessors. This seems bad. This branch removes several such uses, but not all, and extends the macro so that queries can hide their maps (so we can prevent regressions). The extension to the macro is kind of ugly :/ but couldn't find a simple way to do it otherwise (I guess I could use a nested macro...). Anyway I figure it's only temporary.

r? @eddyb
2017-04-28 18:53:24 +00:00
Freyskeyd
0d7e6cf900
refac Move levenchstein before context dependent check
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2017-04-28 20:40:11 +02:00
bors
ad1461efb9 Auto merge of #41575 - alexcrichton:android-qemu-server, r=TimNN
travis: Parallelize tests on Android

Currently our slowest test suite on android, run-pass, takes over 5 times longer
than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed
add overhead, but not 5x for this kind of workload. One of the slowest parts of
the Android process is that *compilation* happens serially. Tests themselves
need to run single-threaded on the emulator (due to how the test harness works)
and this forces the compiles themselves to be single threaded.

Now Travis gives us more than one core per machine, so it'd be much better if we
could take advantage of them! The emulator itself is still fundamentally
single-threaded, but we should see a nice speedup by sending binaries for it to
run much more quickly.

It turns out that we've already got all the toos to do this in-tree. The
qemu-test-{server,client} that are in use for the ARM Linux testing are a
perfect match for the Android emulator. This commit migrates the custom adb
management code in compiletest/rustbuild to the same qemu-test-{server,client}
implementation that ARM Linux uses.

This allows us to lift the parallelism restriction on the compiletest test
suites, namely run-pass. Consequently although we'll still basically run the
tests themselves in single threaded mode we'll be able to compile all of them in
parallel, keeping the pipeline much more full hopefully and using more cores for
the work at hand. Additionally the architecture here should be a bit speedier as
it should have less overhead than adb which is a whole new process on both the
host and the emulator!

Locally on an 8 core machine I've seen the run-pass test suite speed up from
taking nearly an hour to only taking 5 minutes. I don't think we'll see quite a
drastic speedup on Travis but I'm hoping this change can place the Android tests
well below 2 hours instead of just above 2 hours.

Because the client/server here are now repurposed for more than just QEMU,
they've been renamed to `remote-test-{server,client}`.

Note that this PR does not currently modify how debuginfo tests are executed on
Android. While parallelizable it wouldn't be quite as easy, so that's left to
another day. Thankfull that test suite is much smaller than the run-pass test
suite.
2017-04-28 16:10:08 +00:00
Niko Matsakis
d7d3f197f6 introduce ability to if we have typeck-tables for a given def-id
And use this in save-analysis, which used to read the map directly.
This is an attempt to sidestep the failure occuring on homu that I
cannot reproduce.
2017-04-28 10:02:06 -04:00
bors
2971d491b9 Auto merge of #41508 - michaelwoerister:generic-path-remapping, r=alexcrichton
Implement a file-path remapping feature in support of debuginfo and reproducible builds

This PR adds the `-Zremap-path-prefix-from`/`-Zremap-path-prefix-to` commandline option pair and is a more general implementation of #41419. As opposed to the previous attempt, this implementation should enable reproducible builds regardless of the working directory of the compiler.

This implementation of the feature is more general in the sense that the re-mapping will affect *all* paths the compiler emits, including the ones in error messages.

r? @alexcrichton
2017-04-28 12:09:37 +00:00
Michael Woerister
8ea050d89d Disable path remapping test on Windows. 2017-04-28 13:30:07 +02:00
gaurikholkar
ab5d16a6b2 Adding documentation, indentation fixes 2017-04-28 03:58:04 -07:00
Niko Matsakis
2cca2567d9 make ty and impl_trait_ref private
This requires copying out the cycle error to avoid a cyclic borrow.  Is
this a problem? Are there paths where we expect cycles to arise and not
result in errors? (In such cases, we could add a faster way to test for
cycle.)
2017-04-28 05:49:52 -04:00
Niko Matsakis
1ac7eb8649 allow maps to be made private or public
Didn't get around to removing all public access.
2017-04-28 05:49:50 -04:00
Marc-Antoine Perennou
a8c6ba9c6e rustbuild: only build cargo for host
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-28 10:48:49 +02:00
gaurikholkar
5436f859e4 Disable ref hint for pattern in let and adding ui-tests. 2017-04-28 01:31:42 -07:00
Niko Matsakis
d26a7a48fe do not access typeck_tables map directly 2017-04-28 04:15:03 -04:00
Niko Matsakis
b11da34afb do not access associated_item map directly 2017-04-28 04:15:03 -04:00
Niko Matsakis
f35ff22fe8 do not access inherited_impls map directly 2017-04-28 04:15:03 -04:00
bors
ace517da0d Auto merge of #41598 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #41534, #41546, #41571, #41583
- Failed merges:
2017-04-28 04:31:27 +00:00
Corey Farwell
d21c9b921d Rollup merge of #41583 - arielb1:cross-constant, r=eddyb
don't ICE on cross-crate associated const type mismatch

Fixes #41549.

r? @eddyb
2017-04-28 00:29:37 -04:00
Corey Farwell
b37fd3d8c7 Rollup merge of #41571 - alexcrichton:fix-windows-mingw, r=brson
windows: Copy libwinpthread-1.dll into libdir bin

Recently we switched from the win32 MinGW toolchain to the pthreads-based
toolchain. We ship `gcc.exe` from this toolchain with the `rust-mingw` package
in the standard distribution but the pthreads version of `gcc.exe` depends on
`libwinpthread-1.dll`. While we're shipping this DLL for the compiler to depend
on we're not shipping it for gcc. As a workaround just copy the dll to gcc.exe
location and don't attempt to share for now.

cc https://github.com/rust-lang/rust/issues/31840#issuecomment-297478538
2017-04-28 00:29:36 -04:00
Corey Farwell
31c3c0c3ca Rollup merge of #41534 - achernyak:master, r=eddyb
query for describe_def

Resolves `fn describe_def(&self, def: DefId) -> Option<Def>;` of #41417.

r? @nikomatsakis I would greatly appreciate a review. I hope I covered everything described in the pr.
2017-04-28 00:29:35 -04:00
Alex Crichton
7bc2cbf5db travis: Parallelize tests on Android
Currently our slowest test suite on android, run-pass, takes over 5 times longer
than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed
add overhead, but not 5x for this kind of workload. One of the slowest parts of
the Android process is that *compilation* happens serially. Tests themselves
need to run single-threaded on the emulator (due to how the test harness works)
and this forces the compiles themselves to be single threaded.

Now Travis gives us more than one core per machine, so it'd be much better if we
could take advantage of them! The emulator itself is still fundamentally
single-threaded, but we should see a nice speedup by sending binaries for it to
run much more quickly.

It turns out that we've already got all the tools to do this in-tree. The
qemu-test-{server,client} that are in use for the ARM Linux testing are a
perfect match for the Android emulator. This commit migrates the custom adb
management code in compiletest/rustbuild to the same qemu-test-{server,client}
implementation that ARM Linux uses.

This allows us to lift the parallelism restriction on the compiletest test
suites, namely run-pass. Consequently although we'll still basically run the
tests themselves in single threaded mode we'll be able to compile all of them in
parallel, keeping the pipeline much more full and using more cores for the work
at hand. Additionally the architecture here should be a bit speedier as it
should have less overhead than adb which is a whole new process on both the host
and the emulator!

Locally on an 8 core machine I've seen the run-pass test suite speed up from
taking nearly an hour to only taking 6 minutes. I don't think we'll see quite a
drastic speedup on Travis but I'm hoping this change can place the Android tests
well below 2 hours instead of just above 2 hours.

Because the client/server here are now repurposed for more than just QEMU,
they've been renamed to `remote-test-{server,client}`.

Note that this PR does not currently modify how debuginfo tests are executed on
Android. While parallelizable it wouldn't be quite as easy, so that's left to
another day. Thankfully that test suite is much smaller than the run-pass test
suite.

As a final fix I discovered that the ARM and Android test suites were actually
running all library unit tests (e.g. stdtest, coretest, etc) twice. I've
corrected that to only run tests once which should also give a nice boost in
overall cycle time here.
2017-04-27 20:20:13 -07:00
bors
70baf4f13e Auto merge of #41591 - frewsxcv:rollup, r=frewsxcv
Rollup of 7 pull requests

- Successful merges: #41438, #41523, #41526, #41546, #41556, #41572, #41578
- Failed merges:
2017-04-28 00:48:57 +00:00
Corey Farwell
1cd3d2f1c4 Rollup merge of #41578 - arielb1:missing-adjustment, r=eddyb
typeck: resolve type vars before calling `try_index_step`

`try_index_step` does not resolve type variables by itself and would
fail otherwise. Also harden the failure path in `confirm` to cause less
confusing errors.

r? @eddyb

Fixes #41498.

beta-nominating because regression (caused by #41279).
2017-04-27 19:59:18 -04:00
Corey Farwell
6fe2c24be0 Rollup merge of #41572 - frewsxcv:bump-mdbook, r=steveklabnik
Bump mdbook dep to pick up new 'create missing' toggle feature.

This will avoid obscure Travis CI error messages:

* https://github.com/rust-lang/rust/pull/40290#issuecomment-294137045

Original mdbook issue:

* https://github.com/azerupi/mdBook/issues/253

mdbook PR:

* https://github.com/azerupi/mdBook/pull/254
2017-04-27 19:59:17 -04:00
Corey Farwell
f469c4a611 Rollup merge of #41556 - pftbest:fix_msp430_codegen, r=alexcrichton
LLVM: Update submodule to fix incorrect codegen on MSP430.

The bug was reported by @akovaski here:
https://github.com/rust-embedded/rfcs/issues/20#issuecomment-296482148

~~P.S. Looks like this patch will conflict with Hexagon changes.~~

r? @alexcrichton
2017-04-27 19:59:16 -04:00
Corey Farwell
095936c209 Rollup merge of #41526 - steveklabnik:gh35950, r=GuillaumeGomez
Clean up TcpStream example

Fixes #35950
2017-04-27 19:59:15 -04:00
Corey Farwell
9a9420e657 Rollup merge of #41523 - estebank:moved, r=arielb1
Point at variable moved by closure

Fix #41482, #31752.
2017-04-27 19:59:14 -04:00
Corey Farwell
35227db6e6 Rollup merge of #41438 - projektir:mpsc_docs, r=steveklabnik
Adding links and examples for various mspc pages #29377

Adding links and copying examples for the various Iterators; adding some extra stuff to `Sender`/`SyncSender`/`Receiver`.
2017-04-27 19:59:13 -04:00
bors
a8ebd083fc Auto merge of #41529 - bitshifter:issue-41479, r=eddyb
Add missing OperandPair struct field index adjustments. Fixes #41479.

This is a bug fix for a regression in 6d841da4a0.
2017-04-27 21:54:07 +00:00
Cengiz Can
837817c053 use diff crate for compile-fail test diagnostics #41474 2017-04-27 22:41:18 +03:00
achernyak
e24003fb3c query for describe_def 2017-04-27 13:27:16 -05:00
Ariel Ben-Yehuda
019a23ec85 don't ICE on cross-crate associated const type mismatch
Fixes #41549.
2017-04-27 20:06:48 +03:00
bors
94e884b630 Auto merge of #41447 - alexcrichton:sccache-everywhere, r=brson
appveyor: Use Ninja/sccache on MSVC

Now that the final bug fixes have been merged into sccache we can start
leveraging sccache on the MSVC builders on AppVeyor instead of relying on the
ad-hoc caching strategy of trigger files and whatnot.
2017-04-27 16:38:19 +00:00
Corey Farwell
a517a96186 Bump mdbook dep to pick up new 'create missing' toggle feature.
This will avoid obscure Travis CI error messages:

* https://github.com/rust-lang/rust/pull/40290#issuecomment-294137045

Original mdbook issue:

* https://github.com/azerupi/mdBook/issues/253

mdbook PR:

* https://github.com/azerupi/mdBook/pull/254
2017-04-27 10:28:23 -04:00
Alex Crichton
2e72bcb934 appveyor: Use Ninja/sccache on MSVC
Now that the final bug fixes have been merged into sccache we can start
leveraging sccache on the MSVC builders on AppVeyor instead of relying on the
ad-hoc caching strategy of trigger files and whatnot.
2017-04-27 07:19:34 -07:00
Alex Crichton
499b84aca8 travis: Update sccache build used
This build is no longer a forked version with temporary bugfixes, everything
should be upstreamed!
2017-04-27 07:18:01 -07:00
Ariel Ben-Yehuda
a260df27e0 typeck: resolve type vars before calling try_index_step
`try_index_step` does not resolve type variables by itself and would
fail otherwise. Also harden the failure path in `confirm` to cause less
confusing errors.
2017-04-27 16:44:27 +03:00
bors
4961d724f8 Auto merge of #41507 - arielb1:symbol-cache, r=nikomatsakis
cache symbol names in ty::maps

this fixes a performance regression introduced in commit 39a58c38a0.

r? @nikomatsakis
2017-04-27 13:17:55 +00:00
Marc-Antoine Perennou
7b1fb89641 rustbuild: install rustc after cargo and rls
This way its files take precedence (e.g. README.md and stuff)

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 15:05:29 +02:00
bors
79b05fee0f Auto merge of #41433 - estebank:constructor, r=michaelwoerister
Do not show `::{{constructor}}` on tuple struct diagnostics

Fix #41313.
2017-04-27 10:47:56 +00:00
Marc-Antoine Perennou
03c5797552 rustbuild: install cargo and rls when extended build is enabled
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 12:05:34 +02:00
Marc-Antoine Perennou
a2bab1ddf5 rustbuild: add rls_package_vers
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 11:52:58 +02:00
Marc-Antoine Perennou
c4c3b5a443 rustbuild: pass version number as param in install phase
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-27 11:52:58 +02:00