]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #65902 - gilescope:issue62570, r=estebank
Tyler Mandry [Fri, 1 Nov 2019 18:20:14 +0000 (11:20 -0700)]
Rollup merge of #65902 - gilescope:issue62570, r=estebank

Make ItemContext available for better diagnositcs

Fix #62570

4 years agoRollup merge of #65857 - kinnison:kinnison/issue-55364, r=Manisheart,GuillaumeGomez
Tyler Mandry [Fri, 1 Nov 2019 18:20:12 +0000 (11:20 -0700)]
Rollup merge of #65857 - kinnison:kinnison/issue-55364, r=Manisheart,GuillaumeGomez

rustdoc: Resolve module-level doc references more locally

Module level docs should resolve intra-doc links as locally as
possible.  As such, this commit alters the heuristic for finding
intra-doc links such that we attempt to resolve names mentioned
in *inner* documentation comments within the (sub-)module rather
that from the context of its parent.

I'm hoping that this fixes #55364 though right now I'm not sure it's the right fix.

r? @GuillaumeGomez

4 years agoRollup merge of #65471 - GuillaumeGomez:long-err-explanation-E0578, r=Dylan-DPC
Tyler Mandry [Fri, 1 Nov 2019 18:20:11 +0000 (11:20 -0700)]
Rollup merge of #65471 - GuillaumeGomez:long-err-explanation-E0578, r=Dylan-DPC

Add long error explanation for E0578

Part of #61137

r? @kinnison

4 years agoRollup merge of #65470 - traxys:fix_65401, r=michaelwoerister
Tyler Mandry [Fri, 1 Nov 2019 18:20:09 +0000 (11:20 -0700)]
Rollup merge of #65470 - traxys:fix_65401, r=michaelwoerister

Don't hide ICEs from previous incremental compiles

I think this fixes #65401, the compiler does not fail to ICE after the first compilation, tested on the last snippet of [this comment](https://github.com/rust-lang/rust/issues/63154#issuecomment-541592381).
I am not very sure of the fix as I don't understand much of the structure of the compiler.

4 years agoRollup merge of #65112 - jack-t:type-parens-lint, r=varkor
Tyler Mandry [Fri, 1 Nov 2019 18:20:07 +0000 (11:20 -0700)]
Rollup merge of #65112 - jack-t:type-parens-lint, r=varkor

Add lint and tests for unnecessary parens around types

This is my first contribution to the Rust project, so I apologize if I'm not doing things the right way.

The PR fixes #64169. It adds a lint and tests for unnecessary parentheses around types. I've run `tidy` and `rustfmt` — I'm not totally sure it worked right, though — and I've tried to follow the instructions linked in the readme.

I tried to think through all the variants of `ast::TyKind` to find exceptions to this lint, and I could only find the one mentioned in the original issue, which concerns types with `dyn`. I'm not a Rust expert, thought, so I may well be missing something.

There's also a problem with getting this to build. The new lint catches several things in the, e.g., `core`. Because `x.py` seems to build with an equivalent of `-Werror`, what would have been warnings cause the build to break. I got it to build and the tests to pass with `--warnings warn` on my `x.py build` and `x.py test` commands.

4 years agoAuto merge of #65718 - eddyb:codegen-var-debuginfo, r=nikomatsakis
bors [Fri, 1 Nov 2019 11:34:51 +0000 (11:34 +0000)]
Auto merge of #65718 - eddyb:codegen-var-debuginfo, r=nikomatsakis

rustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen.

These are all the codegen changes necessary for #56231.

The refactors were performed locally to codegen, and in several steps, to ease reviewing and avoid introducing changes in behavior (as I'm not sure our debuginfo tests cover enough).

r? @michaelwoerister cc @nagisa @rkruppe @oli-obk

4 years agoAuto merge of #65698 - msizanoen1:dual-proc-macro-hash, r=petrochenkov
bors [Fri, 1 Nov 2019 06:35:40 +0000 (06:35 +0000)]
Auto merge of #65698 - msizanoen1:dual-proc-macro-hash, r=petrochenkov

Dual proc macro hash

This PR changes current `-Z dual-proc-macro` mechanism from resolving only by name to including the hash of the host crate inside the transistive dependency information to prevent name conflicts.
Fix partially #62558

4 years agoAuto merge of #65459 - ecstatic-morse:graphviz-subgraph, r=estebank
bors [Fri, 1 Nov 2019 03:15:31 +0000 (03:15 +0000)]
Auto merge of #65459 - ecstatic-morse:graphviz-subgraph, r=estebank

Fix `-Zunpretty=mir-cfg` to render multiple items

`-Zunpretty=mir-cfg` outputs DOT to stdout for all items being compiled. However, it puts all of these items in separate `digraph`s, which means the result of redirecting that output to a file is not valid. Most dot renderers (I have tried `dot` and `xdot`) cannot render the output.

This PR checks to see if `write_mir_graphviz` will  process multiple items, and writes them each as a `subgraph` in a single, top-level `digraph`. As a result, DOT can be viewed without manually editing the output file. The output is unchanged when printing a single item (e.g.`-Zunpretty=mir-cfg=item_name`).

Here's the output of `xdot` for a rust file containing three items:
![three-items](https://user-images.githubusercontent.com/29463364/66889712-4bf62200-ef98-11e9-83b5-60faa2a300dd.png)

The borders are a result of the nonstandard–but well-supported–[`cluster` prefix](https://graphviz.gitlab.io/_pages/doc/info/lang.html) (search for "Subgraphs and Clusters"). They will not appear if your renderer does not support this extension, but the graph will still render properly.

4 years agorustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen.
Eduard-Mihai Burtescu [Wed, 23 Oct 2019 10:12:11 +0000 (13:12 +0300)]
rustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen.

4 years agorustc_codegen_ssa: hide address ops from the declare_local interface.
Eduard-Mihai Burtescu [Thu, 12 Sep 2019 09:29:46 +0000 (12:29 +0300)]
rustc_codegen_ssa: hide address ops from the declare_local interface.

4 years agorustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext.
Eduard-Mihai Burtescu [Wed, 11 Sep 2019 14:52:39 +0000 (17:52 +0300)]
rustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext.

4 years agorustc_codegen_ssa: change set_var_name back to taking a &str.
Eduard-Mihai Burtescu [Tue, 22 Oct 2019 09:36:00 +0000 (12:36 +0300)]
rustc_codegen_ssa: change set_var_name back to taking a &str.

4 years agorustc_codegen_ssa: move all set_var_name calls to mir::debuginfo.
Eduard-Mihai Burtescu [Fri, 13 Sep 2019 17:04:54 +0000 (20:04 +0300)]
rustc_codegen_ssa: move all set_var_name calls to mir::debuginfo.

4 years agorustc_codegen_ssa: move local variable debuginfo to mir::debuginfo.
Eduard-Mihai Burtescu [Fri, 13 Sep 2019 07:28:14 +0000 (10:28 +0300)]
rustc_codegen_ssa: move local variable debuginfo to mir::debuginfo.

4 years agorustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module.
Eduard-Mihai Burtescu [Wed, 4 Sep 2019 16:44:58 +0000 (19:44 +0300)]
rustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module.

4 years agoAuto merge of #65091 - sekineh:into-iter-sorted, r=KodrAus
bors [Thu, 31 Oct 2019 15:15:53 +0000 (15:15 +0000)]
Auto merge of #65091 - sekineh:into-iter-sorted, r=KodrAus

Implement ordered/sorted iterators on BinaryHeap as per #59278

I've implemented the ordered version of iterator on BinaryHeap as per #59278.

# Added methods:

* `.into_iter_sorted()`
  * like `.into_iter()`; but returns elements in heap order
* `.drain_sorted()`
  * like `.drain()`; but returns elements in heap order
  * It's a bit _lazy_; elements are removed on drop. (Edit: it’s similar to vec::Drain)

For `DrainSorted` struct, I implemented `Drop` trait following @scottmcm 's [suggestion](https://github.com/rust-lang/rust/issues/59278#issuecomment-537306925)

# ~TODO~ DONE
* ~I think I need to add more tests other than doctest.~

# **Notes:**
* we renamed `_ordered` to `_sorted`, because the latter is more common in rust libs. (as suggested by @KodrAus )

4 years agoupdate ui tests
Guillaume Gomez [Wed, 16 Oct 2019 11:29:43 +0000 (13:29 +0200)]
update ui tests

4 years agoAdd long error explanation for E0578
Guillaume Gomez [Wed, 16 Oct 2019 11:29:30 +0000 (13:29 +0200)]
Add long error explanation for E0578

4 years agoAuto merge of #63803 - GuillaumeGomez:stabilize-doctest, r=ollie27,QuietMisdreavus...
bors [Thu, 31 Oct 2019 11:51:42 +0000 (11:51 +0000)]
Auto merge of #63803 - GuillaumeGomez:stabilize-doctest, r=ollie27,QuietMisdreavus,Mark-Simulacrum

[rustdoc] stabilize cfg(doctest)

Fixes #62210.

Since we removed rustdoc from providing cfg(test) on test runs, it's been replaced by cfg(doctest). It'd be nice to have it in not too far in the future.

4 years agoAuto merge of #65982 - RalfJung:miri, r=alexcrichton
bors [Thu, 31 Oct 2019 08:31:27 +0000 (08:31 +0000)]
Auto merge of #65982 - RalfJung:miri, r=alexcrichton

update miri

As a side-effect, this bumps env_logger from 0.7.0 to 0.7.1.

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

4 years agorustdoc: Resolve module-level doc references more locally
Daniel Silverstone [Thu, 31 Oct 2019 07:49:54 +0000 (07:49 +0000)]
rustdoc: Resolve module-level doc references more locally

Module level docs should resolve intra-doc links as locally as
possible.  As such, this commit alters the heuristic for finding
intra-doc links such that we attempt to resolve names mentioned
in *inner* documentation comments within the (sub-)module rather
that from the context of its parent.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
4 years agorebase and re-update lock file
Ralf Jung [Thu, 31 Oct 2019 06:50:54 +0000 (07:50 +0100)]
rebase and re-update lock file

4 years agoupdate miri
Ralf Jung [Wed, 30 Oct 2019 20:03:19 +0000 (21:03 +0100)]
update miri

4 years agoAdjust rustc-workspace-hack
msizanoen1 [Tue, 29 Oct 2019 05:17:18 +0000 (12:17 +0700)]
Adjust rustc-workspace-hack

4 years agoImplement dual proc macro hashing
msizanoen [Tue, 22 Oct 2019 08:47:07 +0000 (15:47 +0700)]
Implement dual proc macro hashing
This changes the mechanism of `-Z dual-proc-macro` to record the host
proc macro hash in the transistive dependency information and use it
during dependency resolution instead of resolving only by name.

4 years agoAuto merge of #65990 - Centril:rollup-v843h4a, r=Centril
bors [Thu, 31 Oct 2019 02:20:30 +0000 (02:20 +0000)]
Auto merge of #65990 - Centril:rollup-v843h4a, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #65274 (Upload toolstates.json to rust-lang-ci2)
 - #65434 (Add long error explanation for E0577)
 - #65850 (Update comments re type parameter hack in object safety)
 - #65955 (ci: revert msys2 ca-certificates hack)
 - #65959 (Fix an incorrect docstring for Immediate in librustc_mir/interpret.)
 - #65979 (Switch CrateMetadata's source_map_import_info from RwLock to Once)
 - #65981 (work around aggressive syntax feature gating)

Failed merges:

r? @ghost

4 years agoRollup merge of #65981 - RalfJung:check-your-gates, r=Centril
Mazdak Farrokhzad [Thu, 31 Oct 2019 01:54:12 +0000 (02:54 +0100)]
Rollup merge of #65981 - RalfJung:check-your-gates, r=Centril

work around aggressive syntax feature gating

This works around https://github.com/rust-lang/rust/issues/65860; fixing `rustc +nightly lib.rs --test --edition 2018` for libcore and thus unblocking https://github.com/RalfJung/miri-test-libstd.

4 years agoRollup merge of #65979 - spastorino:crate-metadata-mutexes, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 31 Oct 2019 01:54:11 +0000 (02:54 +0100)]
Rollup merge of #65979 - spastorino:crate-metadata-mutexes, r=Mark-Simulacrum

Switch CrateMetadata's source_map_import_info from RwLock to Once

4 years agoRollup merge of #65959 - vext01:immediate-docstring, r=davidtwco
Mazdak Farrokhzad [Thu, 31 Oct 2019 01:54:10 +0000 (02:54 +0100)]
Rollup merge of #65959 - vext01:immediate-docstring, r=davidtwco

Fix an incorrect docstring for Immediate in librustc_mir/interpret.

I suspect `Immediate` was once called `Value`?

4 years agoRollup merge of #65955 - pietroalbini:master-revert-msys2-hack, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 31 Oct 2019 01:54:08 +0000 (02:54 +0100)]
Rollup merge of #65955 - pietroalbini:master-revert-msys2-hack, r=Mark-Simulacrum

ci: revert msys2 ca-certificates hack

The hack was added because upstream msys2 broke the ca-certificates package, but since then it has been fixed. This reverts CI to use the upstream package.

Part of #65767

4 years agoRollup merge of #65850 - mikeyhew:patch-1, r=nikomatsakis
Mazdak Farrokhzad [Thu, 31 Oct 2019 01:54:07 +0000 (02:54 +0100)]
Rollup merge of #65850 - mikeyhew:patch-1, r=nikomatsakis

Update comments re type parameter hack in object safety

To check if a method's receiver type is object safe, we create a new receiver type by substituting in a bogus type parameter (let's call it `U`) for `Self`, and checking that the unmodified receiver type implements `DispatchFromDyn<receiver type with Self = U>`. It would be better to use `dyn Trait` directly, and the only reason we don't is because it triggers another check that `Trait` is object safe, resulting in a query cycle. Once the feature `object_safe_for_dispatch` (tracking issue https://github.com/rust-lang/rust/issues/43561) is stabilized, this will no longer be the case, and we'll be able to use `dyn Trait` as the unsized `Self` type. I've updated the comments in object_safety.rs accordingly.

cc @Centril @nikomatsakis @bovinebuddha

4 years agoRollup merge of #65434 - GuillaumeGomez:long-err-explanation-E0577, r=Dylan-DPC
Mazdak Farrokhzad [Thu, 31 Oct 2019 01:54:05 +0000 (02:54 +0100)]
Rollup merge of #65434 - GuillaumeGomez:long-err-explanation-E0577, r=Dylan-DPC

Add long error explanation for E0577

Part of #61137.

r? @kinnison

4 years agoRollup merge of #65274 - pietroalbini:ci-upload-toolstate, r=alexcrichton
Mazdak Farrokhzad [Thu, 31 Oct 2019 01:54:04 +0000 (02:54 +0100)]
Rollup merge of #65274 - pietroalbini:ci-upload-toolstate, r=alexcrichton

Upload toolstates.json to rust-lang-ci2

This PR does two things:

* Following up with https://github.com/rust-lang/rust/pull/65202, it migrates deploying artifacts to CI in a script. Both uploading release artifacts and CPU stats were merged into the same script, designing it to be easily extended.
* Uploads the toolstate JSON to `rust-lang-ci2` along with the release artifacts, both for Linux and Windows. This is needed because @RalfJung wants to stop shipping MIRI when its tests are failing, and the toolstate repo doesn't have entries for each commit. Having the toolstate data (just for that specific commit) on `rust-lang-ci2` will simplify the code a lot.

r? @alexcrichton
cc @RalfJung

4 years agoAuto merge of #65957 - Xanewok:update-rls, r=Xanewok
bors [Wed, 30 Oct 2019 22:37:21 +0000 (22:37 +0000)]
Auto merge of #65957 - Xanewok:update-rls, r=Xanewok

submodules: Bump RLS to 58869107ec162a821a4bee53cdd3f51c84cda3ea

Most importantly it contains https://github.com/rust-lang/rls/commit/d267b49c2f7914f5b4bc94916dc56d64b37adf3a which fixes the RLS build whenever Clippy is built successfully in Rust CI.

Closes #65944

r? @ghost

4 years agoMake init_locking return a reference to the initialized data
Santiago Pastorino [Wed, 30 Oct 2019 21:08:53 +0000 (18:08 -0300)]
Make init_locking return a reference to the initialized data

4 years agowork around aggressive syntax feature gating
Ralf Jung [Wed, 30 Oct 2019 19:59:15 +0000 (20:59 +0100)]
work around aggressive syntax feature gating

4 years agoChange CrateMetadata's source_map_import_info from RwLock to Once
Santiago Pastorino [Wed, 30 Oct 2019 19:22:29 +0000 (16:22 -0300)]
Change CrateMetadata's source_map_import_info from RwLock to Once

This field is created lazily on first use and after that is read only.
That's exactly what Once is for.

4 years agoCorrectly indent get_predicates function
Santiago Pastorino [Wed, 30 Oct 2019 19:22:11 +0000 (16:22 -0300)]
Correctly indent get_predicates function

4 years agoci: move toolstates.json to /tmp/toolstate/ and docker mount it
Pietro Albini [Wed, 30 Oct 2019 18:41:22 +0000 (19:41 +0100)]
ci: move toolstates.json to /tmp/toolstate/ and docker mount it

Before this commit toolstates.json was stored in /tmp and it wasn't
mounted outside the build container. That caused uploading the file in
the upload-artifacts task to fail, as the file was missing on the host.

Mounting /tmp/toolstates.json alone is not the best approach: if the
file is missing when the container is started the Docker engine will
create a *directory* named /tmp/toolstates.json.

The Docker issue could be solved by pre-creating an empty file named
/tmp/toolstates.json, but doing that could cause problems if bootstrap
fails to generate the file and the toolstate scripts receive an empty
JSON.

The approach I took in this commit is to instead mount a /tmp/toolstate
directory inside Docker, and create the toolstates.json file in it. That
also required a small bootstrap change to ensure the directory is
created if it's missing.

4 years agosubmodules: Bump RLS to 58869107ec162a821a4bee53cdd3f51c84cda3ea
Igor Matuszewski [Wed, 30 Oct 2019 08:47:42 +0000 (09:47 +0100)]
submodules: Bump RLS to 58869107ec162a821a4bee53cdd3f51c84cda3ea

Most importantly it contains https://github.com/rust-lang/rls/commit/d267b49c2f7914f5b4bc94916dc56d64b37adf3a
which fixes the RLS build whenever Clippy is built successfully in Rust CI.

4 years agoUpdate ui tests
Guillaume Gomez [Tue, 15 Oct 2019 11:52:57 +0000 (13:52 +0200)]
Update ui tests

4 years agoAdd long error explanation for E0577
Guillaume Gomez [Tue, 15 Oct 2019 11:52:49 +0000 (13:52 +0200)]
Add long error explanation for E0577

4 years agoAuto merge of #65941 - ehuss:update-cargo-books, r=alexcrichton
bors [Wed, 30 Oct 2019 13:34:57 +0000 (13:34 +0000)]
Auto merge of #65941 - ehuss:update-cargo-books, r=alexcrichton

Update cargo, books.

## cargo

8 commits in 3ba5f27170db10af7a92f2b682e049397197b8fa..5da4b4d47963868d9878480197581ccbbdaece74
2019-10-22 15:05:18 +0000 to 2019-10-28 21:53:41 +0000
- Add --filter-platform to `cargo metadata`. (rust-lang/cargo#7376)
- Fix `cargo fix` not showing colors. (rust-lang/cargo#7550)
- Rephrase --manifest-path section (rust-lang/cargo#7409)
- Add a note to discourage the use of -Zminimal-versions. (rust-lang/cargo#7549)
- Fix profile override warning in a workspace. (rust-lang/cargo#7536)
- Fix some tests failing on Windows nightly. (rust-lang/cargo#7534)
- Show better error message for Windows abnormal termination. (rust-lang/cargo#7535)
- Run `apt update` before `apt install` (rust-lang/cargo#7541)

## reference

8 commits in 5b9d2fcefadfc32fceafacfc0dd9441d9b57dd94..4b21b646669e0af49fae7cae301898dc4bfaa1f0
2019-10-03 22:39:10 +0200 to 2019-10-27 22:33:11 +0100
- Document `const_constructor` feature (rust-lang-nursery/reference#677)
- Add `non_exhaustive` to reference. (rust-lang-nursery/reference#609)
- Re-add rust-docs component for lintcheck (rust-lang-nursery/reference#702)
- group signed and unsigned integers in layout table (rust-lang-nursery/reference#700)
- Fix layout table rendering (rust-lang-nursery/reference#699)
- Add reference for attributes in function parameters (rust-lang-nursery/reference#657)
- Update now that proc macros can expand to macro_rules. (rust-lang-nursery/reference#694)
- Fix match in union example. (rust-lang-nursery/reference#684)

## book

8 commits in 9bb8b161963fcebc9d9ccd732ba26f42108016d5..28fa3d15b0bc67ea5e79eeff2198e4277fc61baf
2019-10-14 18:42:55 -0500 to 2019-10-29 07:16:09 -0500
- Update Ch19.1 on slice splitting (rust-lang/book#1999)
- fixed inconsistent terminology regarding enums (rust-lang/book#2022)
- Update ch15-03 code to match output. (rust-lang/book#2020)
- Fixes rust-lang/book#2039 (rust-lang/book#2040)
- Update ch15-03-drop.md (rust-lang/book#2049)
- unit type value is also a value (rust-lang/book#2061)
- Minor: remove an extraneous `.` (rust-lang/book#2059)
- Clarifications and consistent use of quotation marks (rust-lang/book#1992)

## rust-by-example

4 commits in 0b111eaae36cc4b4997684be853882a59e2c7ca7..f3197ddf2abab9abdbc029def8164f4a748b0d91
2019-10-14 18:34:25 -0300 to 2019-10-29 10:17:40 -0300
- Fix typos (rust-lang/rust-by-example#1285)
- Improve Cargo / Dependencies section (rust-lang/rust-by-example#1287)
- Improve Cargo / Build Scripts section (rust-lang/rust-by-example#1288)
- Make if_let exercise runnable (rust-lang/rust-by-example#1289)

4 years agoFix an incorrect docstring for Immediate in librustc_mir/interpret.
Edd Barrett [Wed, 30 Oct 2019 10:03:41 +0000 (10:03 +0000)]
Fix an incorrect docstring for Immediate in librustc_mir/interpret.

4 years agoci: revert msys2 ca-certificates hack
Pietro Albini [Wed, 30 Oct 2019 08:13:26 +0000 (09:13 +0100)]
ci: revert msys2 ca-certificates hack

The hack was added because upstream msys2 broke the ca-certificates
package, but since then it has been fixed. This reverts CI to use the
upstream package.

4 years agoMake ItemContext available for better diagnositcs.
Giles Cope [Mon, 28 Oct 2019 19:04:15 +0000 (19:04 +0000)]
Make ItemContext available for better diagnositcs.

4 years agoAuto merge of #65068 - estebank:trait-impl-lt-mismatch, r=nikomatsakis
bors [Wed, 30 Oct 2019 02:20:55 +0000 (02:20 +0000)]
Auto merge of #65068 - estebank:trait-impl-lt-mismatch, r=nikomatsakis

Custom lifetime error for `impl` item doesn't conform to `trait`

Partly addresses #42706, #41343, fix #40900.

4 years agoAuto merge of #65943 - tmandry:rollup-g20uvkh, r=tmandry
bors [Tue, 29 Oct 2019 19:12:01 +0000 (19:12 +0000)]
Auto merge of #65943 - tmandry:rollup-g20uvkh, r=tmandry

Rollup of 12 pull requests

Successful merges:

 - #65405 (Create new error E0742 and add long error explanation)
 - #65539 (resolve: Turn the "non-empty glob must import something" error into a lint)
 - #65724 (ci: refactor pr tools job skipping)
 - #65741 (Prevent help popup to disappear when clicking on it)
 - #65832 (Re-enable Emscripten's exception handling support)
 - #65843 (Enable dist for MIPS64 musl targets)
 - #65898 (add basic HermitCore support within libtest)
 - #65900 (proc_macro: clean up bridge::client::__run_expand{1,2} a bit.)
 - #65906 (Update mdbook to 0.3.3)
 - #65920 (Use rustc-workspace-hack for rustbook)
 - #65930 (doc: use new feature gate for c_void type)
 - #65936 (save-analysis: Account for async desugaring in async fn return types)

Failed merges:

 - #65434 (Add long error explanation for E0577)

r? @ghost

4 years agoRollup merge of #65936 - Xanewok:save-analysis-async, r=nikomatsakis
Tyler Mandry [Tue, 29 Oct 2019 19:01:49 +0000 (12:01 -0700)]
Rollup merge of #65936 - Xanewok:save-analysis-async, r=nikomatsakis

save-analysis: Account for async desugaring in async fn return types

Closes #65590

When visiting the return type of an async function we need to take into account its desugaring, since it introduces a new definition under which the return type is redefined.

r? @nikomatsakis

4 years agoRollup merge of #65930 - lzutao:new-feature-gate-c_void, r=dtolnay
Tyler Mandry [Tue, 29 Oct 2019 19:01:47 +0000 (12:01 -0700)]
Rollup merge of #65930 - lzutao:new-feature-gate-c_void, r=dtolnay

doc: use new feature gate for c_void type

Closes #63694, closes #55619

4 years agoRollup merge of #65920 - smaeul:patch/workspace-hack, r=alexcrichton
Tyler Mandry [Tue, 29 Oct 2019 19:01:46 +0000 (12:01 -0700)]
Rollup merge of #65920 - smaeul:patch/workspace-hack, r=alexcrichton

Use rustc-workspace-hack for rustbook

As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).

4 years agoRollup merge of #65906 - integer32llc:update-mdbook, r=alexcrichton
Tyler Mandry [Tue, 29 Oct 2019 19:01:44 +0000 (12:01 -0700)]
Rollup merge of #65906 - integer32llc:update-mdbook, r=alexcrichton

Update mdbook to 0.3.3

There are some new features of mdbook that I'd like to use in TRPL.

4 years agoRollup merge of #65900 - eddyb:proc-macro-cleanup, r=alexcrichton
Tyler Mandry [Tue, 29 Oct 2019 19:01:43 +0000 (12:01 -0700)]
Rollup merge of #65900 - eddyb:proc-macro-cleanup, r=alexcrichton

proc_macro: clean up bridge::client::__run_expand{1,2} a bit.

See commit titles/diffs for more details.

The first commit is made possible by #53451 being fixed (almost a year ago).
The last commit should remove the need for `#[allow(improper_ctypes)]` in #65134.

4 years agoRollup merge of #65898 - hermitcore:rusty-hermit, r=kennytm
Tyler Mandry [Tue, 29 Oct 2019 19:01:41 +0000 (12:01 -0700)]
Rollup merge of #65898 - hermitcore:rusty-hermit, r=kennytm

add basic HermitCore support within libtest

This an extension to #65167. The current pull request extend libtest to support HermitCore as target OS.

4 years agoRollup merge of #65843 - xen0n:mips64-musl-targets-with-ci, r=alexcrichton
Tyler Mandry [Tue, 29 Oct 2019 19:01:40 +0000 (12:01 -0700)]
Rollup merge of #65843 - xen0n:mips64-musl-targets-with-ci, r=alexcrichton

Enable dist for MIPS64 musl targets

Continuing work in #63165, necessary libc changes are in place and published so here we go!

4 years agoRollup merge of #65832 - tlively:emscripten-exception-handling, r=alexcrichton
Tyler Mandry [Tue, 29 Oct 2019 19:01:38 +0000 (12:01 -0700)]
Rollup merge of #65832 - tlively:emscripten-exception-handling, r=alexcrichton

Re-enable Emscripten's exception handling support

Passes LLVM codegen and Emscripten link-time flags for exception
handling if and only if the panic strategy is `unwind`. Sets the
default panic strategy for Emscripten targets to `unwind`. Re-enables
tests that depend on unwinding support for Emscripten, including
`should_panic` tests.

r? @alexcrichton

4 years agoRollup merge of #65741 - GuillaumeGomez:help-popup, r=Dylan-DPC
Tyler Mandry [Tue, 29 Oct 2019 19:01:37 +0000 (12:01 -0700)]
Rollup merge of #65741 - GuillaumeGomez:help-popup, r=Dylan-DPC

Prevent help popup to disappear when clicking on it

Fixes #65736.

r? @kinnison

4 years agoRollup merge of #65724 - pietroalbini:ci-remove-template-parameter, r=alexcrichton
Tyler Mandry [Tue, 29 Oct 2019 19:01:35 +0000 (12:01 -0700)]
Rollup merge of #65724 - pietroalbini:ci-remove-template-parameter, r=alexcrichton

ci: refactor pr tools job skipping

We have a job in our CI (PR's x86_64-gnu-tools) that's supposed to run only when a submodule is changed in the PR, and it works by having a task at the start of the build that skips all the following tasks if the condition isn't met.

Before this commit that task was gated with template parameters, which is a unique feature of Azure Pipelines. To make our CI more generic this commit switches the gate to use a simple environment variable plus a condition, which should be supported on more CI providers.

This PR also extracts the skipping logic into a script.

r? @alexcrichton

4 years agoRollup merge of #65539 - traxys:fix_62334, r=petrochenkov
Tyler Mandry [Tue, 29 Oct 2019 19:01:33 +0000 (12:01 -0700)]
Rollup merge of #65539 - traxys:fix_62334, r=petrochenkov

resolve: Turn the "non-empty glob must import something" error into a lint

This fixes #62334 by changing the error to a lint warning the glob. I changed the test but I'm very unsure of what I did as I do not know how to correctly check for the warning

4 years agoRollup merge of #65405 - GuillaumeGomez:long-err-explanation-E0740, r=Dylan-DPC
Tyler Mandry [Tue, 29 Oct 2019 19:01:31 +0000 (12:01 -0700)]
Rollup merge of #65405 - GuillaumeGomez:long-err-explanation-E0740, r=Dylan-DPC

Create new error E0742 and add long error explanation

Part of #61137.

Creates E0742 error code and add its long error explanation.

4 years agoAdd lint for unnecessary parens around types
jack-t [Fri, 4 Oct 2019 05:56:57 +0000 (01:56 -0400)]
Add lint for unnecessary parens around types

4 years agoUpdate cargo, books.
Eric Huss [Tue, 29 Oct 2019 17:45:55 +0000 (10:45 -0700)]
Update cargo, books.

4 years agoSilence crate external span error in x86 platforms
Esteban Küber [Tue, 29 Oct 2019 17:19:40 +0000 (10:19 -0700)]
Silence crate external span error in x86 platforms

This causes issues in at least `dist-i586-gnu-i586-i686-musl`,
possibly others.

4 years agoFix NLL test
Esteban Küber [Tue, 15 Oct 2019 17:57:52 +0000 (10:57 -0700)]
Fix NLL test

4 years agoMake error apply only to impl/trait mismatch
Esteban Küber [Tue, 15 Oct 2019 17:47:48 +0000 (10:47 -0700)]
Make error apply only to impl/trait mismatch

4 years agoPoint at the trait item and tweak wording
Esteban Küber [Tue, 15 Oct 2019 17:36:26 +0000 (10:36 -0700)]
Point at the trait item and tweak wording

4 years agoreview comments
Esteban Küber [Fri, 4 Oct 2019 03:14:48 +0000 (20:14 -0700)]
review comments

4 years agoCustom lifetime error for `impl` item doesn't conform to `trait`
Esteban Küber [Thu, 3 Oct 2019 18:41:27 +0000 (11:41 -0700)]
Custom lifetime error for `impl` item doesn't conform to `trait`

4 years agoAuto merge of #65904 - matthiaskrgr:submodule_upd, r=Manishearth
bors [Tue, 29 Oct 2019 15:57:10 +0000 (15:57 +0000)]
Auto merge of #65904 - matthiaskrgr:submodule_upd, r=Manishearth

submodules: update clippy from 66df92ae to c8e3cfbd

Changes:
````
travis: temporarily disable rustfmt ci check until #4742 is resolved
rustup https://github.com/rust-lang/rust/pull/65792/
Fix ICE #4579
Add regression test for ICE #4579
Run update_lints for Unicode lint
Re-add false positive check
Add raw string regression test for useless_format lint
Re-factor useless_format lint
Update Unicode lint tests
[Backported] Rustup to https://github.com/rust-lang/rust/pull/59545
````

Fixes #65888

r? @oli-obk @Manishearth

4 years agosave-analysis: Account for async desugaring in async fn return types
Igor Matuszewski [Tue, 29 Oct 2019 15:19:16 +0000 (16:19 +0100)]
save-analysis: Account for async desugaring in async fn return types

4 years agodoc: use new feature gate for c_void type
Lzu Tao [Tue, 29 Oct 2019 13:01:54 +0000 (13:01 +0000)]
doc: use new feature gate for c_void type

4 years agoChange E0741 into E0742
Guillaume Gomez [Tue, 29 Oct 2019 12:59:22 +0000 (13:59 +0100)]
Change E0741 into E0742

4 years agoUpdate ui tests
Guillaume Gomez [Mon, 14 Oct 2019 12:07:05 +0000 (14:07 +0200)]
Update ui tests

4 years agoAdd long error explanation for E0740
Guillaume Gomez [Mon, 14 Oct 2019 12:06:54 +0000 (14:06 +0200)]
Add long error explanation for E0740

4 years agoCreate new error code E0740 for visibility restrictions to ancestor module issues
Guillaume Gomez [Mon, 14 Oct 2019 11:13:38 +0000 (13:13 +0200)]
Create new error code E0740 for visibility restrictions to ancestor module issues

4 years agoUpdate since version for doctest feature
Guillaume Gomez [Tue, 1 Oct 2019 13:25:03 +0000 (15:25 +0200)]
Update since version for doctest feature

4 years agoimprove documentation of rustdoc doctest feature
Guillaume Gomez [Tue, 1 Oct 2019 12:50:05 +0000 (14:50 +0200)]
improve documentation of rustdoc doctest feature

4 years agostabilize cfg(doctest)
Guillaume Gomez [Thu, 1 Aug 2019 21:18:37 +0000 (23:18 +0200)]
stabilize cfg(doctest)

4 years agoAuto merge of #65927 - eddyb:eval-always-considered-harmful, r=michaelwoerister
bors [Tue, 29 Oct 2019 11:28:28 +0000 (11:28 +0000)]
Auto merge of #65927 - eddyb:eval-always-considered-harmful, r=michaelwoerister

Don't use eval_always for miri queries used from codegen.

This should fix the [massive incremental perf regression](https://perf.rust-lang.org/compare.html?start=95f437b3cfb2fec966d7eaf69d7c2e36f9c274d1&end=9285d401a6070094747465962bc49969b93e14c5&stat=instructions:u) introduced in #65664.

It seems that `eval_always` was mistakenly(?) added to `const_field` and then it ended up on `const_caller_location` (which is used much more often than `const_field` is).

r? @michaelwoerister cc @oli-obk @nnethercote

4 years agoDon't use eval_always for miri queries used from codegen.
Eduard-Mihai Burtescu [Tue, 29 Oct 2019 11:04:29 +0000 (13:04 +0200)]
Don't use eval_always for miri queries used from codegen.

4 years agoApply suggestions from lzutao
Pietro Albini [Tue, 29 Oct 2019 09:32:51 +0000 (10:32 +0100)]
Apply suggestions from lzutao

Co-Authored-By: lzutao <taolzu@gmail.com>
4 years agoApply suggestions from lzutao
Pietro Albini [Tue, 29 Oct 2019 09:14:42 +0000 (10:14 +0100)]
Apply suggestions from lzutao

Co-Authored-By: lzutao <taolzu@gmail.com>
4 years agoci: upload toolstates.json to rust-lang-ci2
Pietro Albini [Thu, 10 Oct 2019 15:32:50 +0000 (17:32 +0200)]
ci: upload toolstates.json to rust-lang-ci2

Uploading the toolstate data for each commit will help our release
tooling understand which components are failing, to possibly skip
shipping broken tools to users.

4 years agoci: extract uploading artifacts into a script
Pietro Albini [Thu, 10 Oct 2019 15:04:44 +0000 (17:04 +0200)]
ci: extract uploading artifacts into a script

4 years agoci: extract job skipping logic into a script
Pietro Albini [Wed, 23 Oct 2019 14:07:13 +0000 (16:07 +0200)]
ci: extract job skipping logic into a script

4 years agoci: enable "run when submodule changes" with environment variables
Pietro Albini [Wed, 23 Oct 2019 13:56:21 +0000 (15:56 +0200)]
ci: enable "run when submodule changes" with environment variables

We have a job in our CI (PR's x86_64-gnu-tools) that's supposed to run
only when a submodule is changed in the PR, and it works by having a
task at the start of the build that skips all the following tasks if the
condition isn't met.

Before this commit that task was gated with template parameters, which
is a unique feature of Azure Pipelines. To make our CI more generic this
commit switches the gate to use a simple environment variable plus a
condition, which should be supported on more CI providers.

4 years agoAuto merge of #65435 - michaelwoerister:fix-issue-64153, r=alexcrichton
bors [Tue, 29 Oct 2019 07:38:50 +0000 (07:38 +0000)]
Auto merge of #65435 - michaelwoerister:fix-issue-64153, r=alexcrichton

Fix #64153

This PR changes how the compiler detects if an object file from an upstream crate is a Rust object file or not. Instead of checking if the name starts with the crate name and ends with `.o` (which is not always the case, as described in #64153), it now just checks if the filename ends with `.rcgu.o`.

This fixes #64153. However, ideally we'd clean up the code around filename generation some more. Then this check could be made more robust.

r? @alexcrichton

4 years agoAuto merge of #65919 - Centril:rollup-qrgwnt6, r=Centril
bors [Tue, 29 Oct 2019 04:12:23 +0000 (04:12 +0000)]
Auto merge of #65919 - Centril:rollup-qrgwnt6, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #65294 (Lint ignored `#[inline]` on function prototypes)
 - #65318 (Call out the types that are non local on E0117)
 - #65531 (Update backtrace to 0.3.40)
 - #65562 (Improve the "try using a variant of the expected type" hint.)
 - #65809 (Add new EFIAPI ABI)

Failed merges:

r? @ghost

4 years agoUse rustc-workspace-hack for rustbook
Samuel Holland [Sun, 6 Oct 2019 22:30:11 +0000 (17:30 -0500)]
Use rustc-workspace-hack for rustbook

As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).

4 years agoRollup merge of #65809 - roblabla:eficall-abi, r=nagisa
Mazdak Farrokhzad [Tue, 29 Oct 2019 03:08:23 +0000 (04:08 +0100)]
Rollup merge of #65809 - roblabla:eficall-abi, r=nagisa

Add new EFIAPI ABI

Fixes #54527

Adds a new ABI, "efiapi", which reflects the calling convention as specified by [the current spec UEFI spec](https://uefi.org/sites/default/files/resources/UEFI%20Spec%202_7_A%20Sept%206.pdf#G6.999903). When compiling for x86_64, we should select the `win64` ABI, while on all other architectures (Itanium, x86, ARM and ARM64 and RISC-V), we should select the `C` ABI.

Currently, this is done by just turning it into the C ABI everywhere except on x86_64, where it's turned into the win64 ABI. Should we prevent this ABI from being used on unsupported architectures, and if so, how would this be done?

4 years agoRollup merge of #65562 - Patryk27:master, r=estebank
Mazdak Farrokhzad [Tue, 29 Oct 2019 03:08:21 +0000 (04:08 +0100)]
Rollup merge of #65562 - Patryk27:master, r=estebank

Improve the "try using a variant of the expected type" hint.

Fix https://github.com/rust-lang/rust/issues/65494.

- Change type-printing output.
- Use `span_to_snippet` when possible.
- Change the message to `try using a variant of the expected enum`

4 years agoRollup merge of #65531 - tmandry:bump-backtrace, r=cramertj
Mazdak Farrokhzad [Tue, 29 Oct 2019 03:08:20 +0000 (04:08 +0100)]
Rollup merge of #65531 - tmandry:bump-backtrace, r=cramertj

Update backtrace to 0.3.40

Diff: https://github.com/rust-lang/backtrace-rs/compare/0.3.37...b5cc5b12fa4fd03cb83546a7c62b9fff40086b63

Pretty low risk, considering the only changes are in low-tier targets.

r? @cramertj
cc @alexcrichton

4 years agoRollup merge of #65318 - estebank:coherence, r=varkor
Mazdak Farrokhzad [Tue, 29 Oct 2019 03:08:19 +0000 (04:08 +0100)]
Rollup merge of #65318 - estebank:coherence, r=varkor

Call out the types that are non local on E0117

CC #24745.

4 years agoRollup merge of #65294 - varkor:lint-inline-prototype, r=matthewjasper
Mazdak Farrokhzad [Tue, 29 Oct 2019 03:08:18 +0000 (04:08 +0100)]
Rollup merge of #65294 - varkor:lint-inline-prototype, r=matthewjasper

Lint ignored `#[inline]` on function prototypes

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

- Adds a `unused_attribute` lint for `#[inline]` on function prototypes.
- As a consequence, foreign items, impl items and trait items now have their attributes checked, which could cause some code to no longer compile (it was previously erroneously ignored).

4 years agoUpdate backtrace to 0.3.40
Tyler Mandry [Thu, 17 Oct 2019 22:58:48 +0000 (15:58 -0700)]
Update backtrace to 0.3.40

4 years agoforgot to add the changed stderr
Quentin Boyer [Mon, 28 Oct 2019 23:20:28 +0000 (00:20 +0100)]
forgot to add the changed stderr

4 years agoAuto merge of #65907 - Centril:rollup-9i8ev23, r=Centril
bors [Mon, 28 Oct 2019 20:59:36 +0000 (20:59 +0000)]
Auto merge of #65907 - Centril:rollup-9i8ev23, r=Centril

Rollup of 9 pull requests

Successful merges:

 - #65563 (Add long error explanation for E0587)
 - #65640 (Use heuristics to recover parsing of missing `;`)
 - #65643 (Correct handling of type flags with `ConstValue::Placeholder`)
 - #65825 (rustc: use IndexVec<DefIndex, T> instead of Vec<T>.)
 - #65858 (suggest `const_in_array_repeat_expression` flag)
 - #65877 (doc: introduce `once` in `iter::chain` document)
 - #65887 (doc: mention `get(_mut)` in Vec)
 - #65891 (self-profiling: Record something more useful for crate metadata generation event.)
 - #65893 (Output previous stable  error messaging when using stable build.)

Failed merges:

r? @ghost

4 years agoRollup merge of #65893 - jafern14:let-expr-stable-error-messaging, r=Centril
Mazdak Farrokhzad [Mon, 28 Oct 2019 20:36:08 +0000 (21:36 +0100)]
Rollup merge of #65893 - jafern14:let-expr-stable-error-messaging, r=Centril

Output previous stable  error messaging when using stable build.

Fixes #65254

As I had mentioned previously there I have the logic running right now however I'm not getting the exact same syntax highlighting as there was originally for this error.

I'm currently getting the following:
```
error: expected expression, found statement (`let`)
 --> src/main.rs:2:14
  |
2 |     let x = (let y = 6);
  |              ^^^^^^^^^
  |
  = note: variable declaration using `let` is a statement
```

I'd like to get the following instead:

```
  |     let x = (let y = 6);
  |              ^^^
```

My current understanding is that the `span` being passed into `lower_expr_let` is coming from `lowering.rs`. I still don't know how the byte range is calculated for the erroneous syntax and need to look into it a bit more. In the meantime does anybody have any hints/tips regarding this??

4 years agoRollup merge of #65891 - michaelwoerister:sp-crate-metadata, r=wesleywiser
Mazdak Farrokhzad [Mon, 28 Oct 2019 20:36:07 +0000 (21:36 +0100)]
Rollup merge of #65891 - michaelwoerister:sp-crate-metadata, r=wesleywiser

self-profiling: Record something more useful for crate metadata generation event.

Before this commit, we had an event that would only track the compression step
for proc-macros and Rust dylibs. After the commit we measure the time for
acutally generating the crate metadata bytes.

r? @wesleywiser

4 years agoRollup merge of #65887 - lzutao:doc-vec-get, r=rkruppe
Mazdak Farrokhzad [Mon, 28 Oct 2019 20:36:06 +0000 (21:36 +0100)]
Rollup merge of #65887 - lzutao:doc-vec-get, r=rkruppe

doc: mention `get(_mut)` in Vec