Commit Graph

101665 Commits

Author SHA1 Message Date
Dylan MacKenzie
46b68b009b Emit errors in promote_consts when required promotion fails 2019-10-29 13:58:17 -07:00
Dylan MacKenzie
9bb983380b Add method to Candidate that determines its promotability rules 2019-10-29 13:58:17 -07:00
bors
aa69777ea2 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
2019-10-29 19:12:01 +00:00
Tyler Mandry
db49686460
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
2019-10-29 12:01:49 -07:00
Tyler Mandry
73dcb96905
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
2019-10-29 12:01:47 -07:00
Tyler Mandry
4359666daa
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).
2019-10-29 12:01:46 -07:00
Tyler Mandry
67558a890e
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.
2019-10-29 12:01:44 -07:00
Tyler Mandry
dfac64b325
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.
2019-10-29 12:01:43 -07:00
Tyler Mandry
4bb91c7845
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.
2019-10-29 12:01:41 -07:00
Tyler Mandry
e15f1be63e
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!
2019-10-29 12:01:40 -07:00
Tyler Mandry
8aa23125bb
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
2019-10-29 12:01:38 -07:00
Tyler Mandry
c4960c2602
Rollup merge of #65741 - GuillaumeGomez:help-popup, r=Dylan-DPC
Prevent help popup to disappear when clicking on it

Fixes #65736.

r? @kinnison
2019-10-29 12:01:37 -07:00
Tyler Mandry
5e84805bb3
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
2019-10-29 12:01:35 -07:00
Tyler Mandry
0d755ff672
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
2019-10-29 12:01:33 -07:00
Tyler Mandry
3f50a0dec8
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.
2019-10-29 12:01:31 -07:00
jack-t
08ca2360c4 Add lint for unnecessary parens around types 2019-10-29 18:11:12 +00:00
Eric Huss
33591a7d57 Update cargo, books. 2019-10-29 10:45:55 -07:00
Esteban Küber
213fd1f37f Silence crate external span error in x86 platforms
This causes issues in at least `dist-i586-gnu-i586-i686-musl`,
possibly others.
2019-10-29 10:19:59 -07:00
Esteban Küber
a3b86879a0 Fix NLL test 2019-10-29 10:19:59 -07:00
Esteban Küber
9ae0c1d7e9 Make error apply only to impl/trait mismatch 2019-10-29 10:19:59 -07:00
Esteban Küber
6998085c03 Point at the trait item and tweak wording 2019-10-29 10:19:58 -07:00
Esteban Küber
ef2a8539aa review comments 2019-10-29 10:19:58 -07:00
Esteban Küber
c3521fe940 Custom lifetime error for impl item doesn't conform to trait 2019-10-29 10:19:58 -07:00
bors
caa1f8d7b3 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
2019-10-29 15:57:10 +00:00
Igor Matuszewski
e755963cbd save-analysis: Account for async desugaring in async fn return types 2019-10-29 16:25:37 +01:00
Lzu Tao
bc98c86a8b doc: use new feature gate for c_void type 2019-10-29 13:01:54 +00:00
Guillaume Gomez
9869e5b969 Change E0741 into E0742 2019-10-29 13:59:40 +01:00
Guillaume Gomez
6c7fe5a94e Update ui tests 2019-10-29 13:56:19 +01:00
Guillaume Gomez
208af201ec Add long error explanation for E0740 2019-10-29 13:56:19 +01:00
Guillaume Gomez
c8420db21d Create new error code E0740 for visibility restrictions to ancestor module issues 2019-10-29 13:56:19 +01:00
Guillaume Gomez
1595fdee1f Update since version for doctest feature 2019-10-29 13:42:55 +01:00
Guillaume Gomez
3e3d919dab improve documentation of rustdoc doctest feature 2019-10-29 13:42:55 +01:00
Guillaume Gomez
a212960a4b stabilize cfg(doctest) 2019-10-29 13:42:55 +01:00
bors
d3d28a4920 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
2019-10-29 11:28:28 +00:00
Eduard-Mihai Burtescu
beb06aed9a Don't use eval_always for miri queries used from codegen. 2019-10-29 13:04:29 +02:00
Pietro Albini
95ad6c33c7
Apply suggestions from lzutao
Co-Authored-By: lzutao <taolzu@gmail.com>
2019-10-29 10:32:51 +01:00
Pietro Albini
bdfcde439b
Apply suggestions from lzutao
Co-Authored-By: lzutao <taolzu@gmail.com>
2019-10-29 10:14:42 +01:00
Pietro Albini
02000505c1
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.
2019-10-29 10:08:01 +01:00
Pietro Albini
4479de4b4a
ci: extract uploading artifacts into a script 2019-10-29 10:07:39 +01:00
Pietro Albini
4fb8a9a73c
ci: extract job skipping logic into a script 2019-10-29 10:01:43 +01:00
Pietro Albini
53be272415
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.
2019-10-29 10:01:27 +01:00
bors
eb5ef813f0 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
2019-10-29 07:38:50 +00:00
bors
2dd4e7320e 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
2019-10-29 04:12:23 +00:00
Samuel Holland
c648ad587c 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).
2019-10-28 22:34:43 -05:00
Mazdak Farrokhzad
46063ed23f
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?
2019-10-29 04:08:23 +01:00
Mazdak Farrokhzad
9c5b6b2201
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`
2019-10-29 04:08:21 +01:00
Mazdak Farrokhzad
ffc6225cd2
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
2019-10-29 04:08:20 +01:00
Mazdak Farrokhzad
b07e8ed825
Rollup merge of #65318 - estebank:coherence, r=varkor
Call out the types that are non local on E0117

CC #24745.
2019-10-29 04:08:19 +01:00
Mazdak Farrokhzad
42d4e261a1
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).
2019-10-29 04:08:18 +01:00
Esteban Küber
58b67c8811 Use structured suggestion for unnecessary bounds in type aliases 2019-10-28 16:58:27 -07:00