Commit Graph

101637 Commits

Author SHA1 Message Date
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
Tyler Mandry
d7f99dadd4 Update backtrace to 0.3.40 2019-10-28 16:27:07 -07:00
Quentin Boyer
ed8585ffb5 forgot to add the changed stderr 2019-10-29 00:20:28 +01:00
bors
cac6821810 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
2019-10-28 20:59:36 +00:00
Mazdak Farrokhzad
30431a33ea
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??
2019-10-28 21:36:08 +01:00
Mazdak Farrokhzad
545166435c
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
2019-10-28 21:36:07 +01:00
Mazdak Farrokhzad
cceefd3d98
Rollup merge of #65887 - lzutao:doc-vec-get, r=rkruppe
doc: mention `get(_mut)` in Vec
2019-10-28 21:36:06 +01:00
Mazdak Farrokhzad
23dbdb46ee
Rollup merge of #65877 - lzutao:iter-chain-once, r=Centril
doc: introduce `once` in `iter::chain` document

I find it hard to find which one to use with `chain` when I only need to
chain one value. Also [`once`][1] talks about `chain`.

[1]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
2019-10-28 21:36:04 +01:00
Mazdak Farrokhzad
d887232035
Rollup merge of #65858 - davidtwco:rfc-2203-feature-gate-in-error, r=ecstatic-morse
suggest `const_in_array_repeat_expression` flag

This PR adds a suggestion to add the `#![feature(const_in_array_repeat_expression)]` attribute to the crate when a promotable expression is used in a repeat expression and the feature gate is not enabled.

Unfortunately, this ended up being a little bit more complex than I anticipated, which may not have been worth it given that this would all be removed when the feature is stabilized. However, with #65732 and #65737 being open, and the feature gate having not been being suggested to potential users, the feature might not be stabilized in a while, so maybe this is worth landing.

cc @Centril (addresses [this comment](https://github.com/rust-lang/rust/pull/61749#discussion_r307863857))
r? @ecstatic-morse (opened issues related to RFC 2203 recently)
2019-10-28 21:36:02 +01:00
Mazdak Farrokhzad
531240c626
Rollup merge of #65825 - eddyb:def-index-vec, r=varkor
rustc: use IndexVec<DefIndex, T> instead of Vec<T>.

Now that `DefIndex` is a proper index type, we can do that.
There was also an unnecessary `Option` I removed, I wonder if that has perf implications.
2019-10-28 21:36:01 +01:00
Mazdak Farrokhzad
216e50d904
Rollup merge of #65643 - varkor:remove-free-regions-from-const-placeholder, r=eddyb
Correct handling of type flags with `ConstValue::Placeholder`

This fixes a mistake, but not https://github.com/rust-lang/rust/issues/65623.

r? @eddyb
2019-10-28 21:35:59 +01:00
Mazdak Farrokhzad
2fe6f22dea
Rollup merge of #65640 - estebank:recover-missing-semi, r=Centril
Use heuristics to recover parsing of missing `;`

- Detect `,` and `:` typos where `;` was intended.
- When the next token could have been the start of a new statement,
  detect a missing semicolon.

Fix #48160, fix #44767 (after adding note about statements).
2019-10-28 21:35:58 +01:00
Mazdak Farrokhzad
eec3a9c4af
Rollup merge of #65563 - GuillaumeGomez:long-err-explanation-E0587, r=Dylan-DPC
Add long error explanation for E0587

Part of #61137.

r? @kinnison
2019-10-28 21:35:56 +01:00
Carol (Nichols || Goulding)
3bd16c291e
Update mdbook to 0.3.3 2019-10-28 16:21:53 -04:00
Agustin Fernandez
f1aa8b2c01 Output previous stable error messaging when using stable build. 2019-10-28 15:49:22 -04:00
Matthias Krüger
f9ac609a42 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
2019-10-28 20:42:06 +01:00
Thomas Lively
92c049be58 Revert "Temporarily enable asmjs and wasm32 CI on PRs"
This reverts commit 29d6aaae32.
2019-10-28 12:30:08 -07:00
David Wood
92b151287f
suggest const_in_array_repeat_expression flag
This commit adds a suggestion to add the
`#![feature(const_in_array_repeat_expression)]` attribute to the crate
when a promotable expression is used in a repeat expression.

Signed-off-by: David Wood <david@davidtw.co>
2019-10-28 18:37:49 +00:00
Eduard-Mihai Burtescu
b58634454f proc_macro: don't use Rust ABI fn pointers in a C ABI fn signature. 2019-10-28 20:34:59 +02:00
Eduard-Mihai Burtescu
da5965f3a6 proc_macro: consolidate bridge::client::run_expand{1,2} into one helper. 2019-10-28 20:21:12 +02:00
Stefan Lankes
cf65200e5c removing trailing whitespaces 2019-10-28 14:03:53 -04:00
Eduard-Mihai Burtescu
b3f64946f9 proc_macro: remove now-unnecessary ICE workarounds from bridge::client. 2019-10-28 19:55:25 +02:00
Esteban Küber
e8016c2b13 review comments 2019-10-28 10:53:13 -07:00
Esteban Küber
1b0836df6f Tweak unexpected token wording 2019-10-28 10:53:13 -07:00
Esteban Küber
d673d0ac84 Use heuristics to recover parsing of missing ;
- Detect `,` and `:` typos where `;` was intended.
- When the next token could have been the start of a new statement,
  detect a missing semicolon.
2019-10-28 10:53:13 -07:00