Commit graph

96493 commits

Author SHA1 Message Date
Mazdak Farrokhzad
e5590425e9
Rollup merge of #62827 - nikic:llvm-components, r=alexcrichton
Don't link mcjit/interpreter LLVM components

We don't use these. Drop related unused ExecutionEngine header uses.

As some drive-by cleanup drop the unused `EnableARMEHABI` global and remove an outdated version check for the hexagon component.

r? @alexcrichton
2019-07-25 01:05:02 +02:00
Mazdak Farrokhzad
b1a866012d
Rollup merge of #62814 - androm3da:hexagon_19jul_2019, r=alexcrichton
add support for hexagon-unknown-linux-musl
2019-07-25 01:05:00 +02:00
Mazdak Farrokhzad
8d9000d38c
Rollup merge of #62784 - Disasm:riscv32i, r=estebank
Add riscv32i-unknown-none-elf target

This target is likely to be useful for constrained FPGA soft-cores, such as picorv32 and HeavyX.
2019-07-25 01:04:59 +02:00
Mazdak Farrokhzad
5ef2162fb1
Rollup merge of #62758 - alexcrichton:llvm-tarball-windows, r=pietroalbini
ci: Install clang on Windows through tarballs

Previously we used the executables built the LLVM project but these
executables are difficult to run in a CI environment, they can
accidentally pollute global state, etc. In testing some of the possible
4-core machine environments for Azure this step would frequently cause
issues.

To assuage these future issues and hopefully make builds slightly more
self-contained, this commit changes to install from a tarball instead.
The tarball isn't provided by LLVM itself, but we use the offical LLVM
installer to extract itself and then we pack up the LLVM installation
directory into the tarball.
2019-07-25 01:04:57 +02:00
Mazdak Farrokhzad
a676a36662
Rollup merge of #62736 - lqd:polonius_tests3, r=matthewjasper
Polonius: fix some cases of `killed` fact generation, and most of the `ui` test suite

Since basic Polonius functionality was re-enabled by @matthewjasper in #54468, some tests were still failing in the polonius compare-mode.

This PR fixes all but one test in the `ui` suite by:
- fixing some bugs in the fact generation code, related to the `killed` relation: Polonius would incorrectly reject some NLL-accepted code, because of these missing `killed` facts.
- ignoring some tests in the polonius compare-mode: a lot of those manually test the NLL or migrate mode, and the failures were mostly artifacts of the test revisions, e.g. that `-Z polonius` requires full NLLs. Some others were also both failing with NLL and succeeding with Polonius, which we can't encode in tests at the moment.
- blessing the output of some tests: whenever Polonius and NLL have basically the same errors, except for diagnostics differences, the Polonius output is blessed. Whenever we've advanced into a less experimental phase, we'll want to revisit these cases (much like we did on the NLL test suite last year) to specifically work on diagnostics.

Fact generation changes:
- we now kill loans on the destination place of `Call` terminators
- we now kill loans on the locals destroyed by `StorageDead`
- we now also handle assignments to projections: killing the loans on a either a deref-ed local, or the ones whose `borrowed_place` conflicts with the current place.

One failing test remains: an overflow during fact generation, on a case of polymorphic recursion (and which I'll continue investigating later).

This adds some tests for the fact generation changes, with some simple Polonius cases similar to the existing smoke tests, but also for some cases encountered in the wild (in the `rand` crate for example).

A more detailed write-up is available [here](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) with an explanation for each test failure, the steps taken to resolve it (as a commit in the current PR), NLL and Polonius outputs (and diff), etc.

Since they've worked on this before, and we've discussed some of these failures together:

r? @matthewjasper
2019-07-25 01:04:55 +02:00
Mazdak Farrokhzad
40be4000b9
Rollup merge of #61727 - Mark-Simulacrum:crate-deps-in-deps, r=alexcrichton
Add binary dependencies to dep-info files

I'm not sure about the lack of incremental-tracking here, but since I'm pretty sure this runs on every compile anyway it might not matter? If there's a better place/way to get at the information I want, I'm happy to refactor the code to match.

r? @alexcrichton
2019-07-25 01:04:54 +02:00
bors
03f19f7ff1 Auto merge of #62935 - Centril:rollup-hzj9att, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #62641 (Regenerate character tables for Unicode 12.1)
 - #62716 (state also in the intro that UnsafeCell has no effect on &mut)
 - #62738 (Remove uses of mem::uninitialized from std::sys::cloudabi)
 - #62772 (Suggest trait bound on type parameter when it is unconstrained)
 - #62890 (Normalize use of backticks in compiler messages for libsyntax/*)
 - #62905 (Normalize use of backticks in compiler messages for doc)
 - #62916 (Add test `self-in-enum-definition`)
 - #62917 (Always emit trailing slash error)
 - #62926 (Fix typo in mem::uninitialized doc)
 - #62927 (use PanicMessage in MIR, kill InterpError::description)

Failed merges:

r? @ghost
2019-07-24 15:59:00 +00:00
Mark Rousskov
d749b5e223 Gate binary dependency information behind -Zbinary-dep-depinfo 2019-07-24 11:00:09 -04:00
Mark Rousskov
eafb42dc94 Add binary dependencies to dep-info files 2019-07-24 10:49:22 -04:00
Mazdak Farrokhzad
e27927d2ff
Rollup merge of #62927 - RalfJung:panic, r=oli-obk
use PanicMessage in MIR, kill InterpError::description

r? @oli-obk @eddyb
Cc @saleemjaffer https://github.com/rust-rfcs/const-eval/issues/4
2019-07-24 16:13:23 +02:00
Mazdak Farrokhzad
0466237555
Rollup merge of #62926 - Smibu:fix-typo, r=jonas-schievink
Fix typo in mem::uninitialized doc
2019-07-24 16:13:22 +02:00
Mazdak Farrokhzad
c44e29bb59
Rollup merge of #62917 - estebank:trailing-slash, r=matklad
Always emit trailing slash error

Fix #62913.

r? @petrochenkov
2019-07-24 16:13:20 +02:00
Mazdak Farrokhzad
92aff0a982
Rollup merge of #62916 - Centril:self-in-enum-def, r=oli-obk
Add test `self-in-enum-definition`

Apparently there was no test covering this...

r? @oli-obk
cc @petrochenkov
2019-07-24 16:13:18 +02:00
Mazdak Farrokhzad
52247b2383
Rollup merge of #62905 - fakenine:normalize_use_of_backticks_compiler_messages_p16, r=Centril
Normalize use of backticks in compiler messages for doc

https://github.com/rust-lang/rust/issues/60532
2019-07-24 16:13:17 +02:00
Mazdak Farrokhzad
5c8dfd589c
Rollup merge of #62890 - fakenine:normalize_use_of_backticks_compiler_messages_p15, r=Centril
Normalize use of backticks in compiler messages for libsyntax/*

https://github.com/rust-lang/rust/issues/60532
2019-07-24 16:13:15 +02:00
Mazdak Farrokhzad
e933f54793
Rollup merge of #62772 - estebank:trait-bound, r=matthewjasper
Suggest trait bound on type parameter when it is unconstrained

Given

```
trait Foo { fn method(&self) {} }

fn call_method<T>(x: &T) {
    x.method()
}
```

suggest constraining `T` with `Foo`.

Fix #21673, fix #41030.
2019-07-24 16:13:14 +02:00
Mazdak Farrokhzad
efdcce1955
Rollup merge of #62738 - nathanwhit:fix_mem_uninit_cloudabi, r=RalfJung
Remove uses of mem::uninitialized from std::sys::cloudabi

Addresses #62397 for std::sys::cloudabi, excluding the tests within cloudabi, which will be a separate PR
2019-07-24 16:13:12 +02:00
Mazdak Farrokhzad
a7d993961f
Rollup merge of #62716 - RalfJung:unsafe-cell, r=Centril
state also in the intro that UnsafeCell has no effect on &mut

Just to be extra sure.
2019-07-24 16:13:09 +02:00
Mazdak Farrokhzad
21caaba2bc
Rollup merge of #62641 - cuviper:unicode-12.1, r=matklad
Regenerate character tables for Unicode 12.1
2019-07-24 16:13:07 +02:00
bors
27a6a304e2 Auto merge of #62908 - fakenine:normalize_use_of_backticks_compiler_messages_p17, r=alexreg
normalize use of backticks for compiler messages in remaining modules

https://github.com/rust-lang/rust/issues/60532
2019-07-24 10:03:20 +00:00
Ralf Jung
ff18786683
Apply suggestions from code review
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-24 11:45:39 +02:00
Ralf Jung
18551e7d45 fix unused import 2019-07-24 11:43:59 +02:00
Mazdak Farrokhzad
7fdfe8b854 Refer to #50072 re. hack. 2019-07-24 11:37:09 +02:00
Mika Lehtinen
a44f43e8b5 Fix typo in mem::uninitialized doc 2019-07-24 11:34:30 +03:00
Ralf Jung
495f9509fe use PanicMessage type for MIR assertion errors 2019-07-24 10:24:55 +02:00
Ralf Jung
3694d176a2 kill InterpError::description 2019-07-24 09:29:18 +02:00
Ralf Jung
c0420b1a59 do not use InterpError::description outside librustc::mir 2019-07-24 09:12:21 +02:00
Mazdak Farrokhzad
2e193f7db7 Add test self-in-enum-definition 2019-07-24 04:14:09 +02:00
Esteban Küber
e26e6749fb Always emit trailing slash error 2019-07-23 17:24:18 -07:00
Samy Kacimi
66815c613a
normalize use of backticks for compiler messages in remaining modules
https://github.com/rust-lang/rust/issues/60532
2019-07-23 23:09:59 +02:00
bors
a7f28678bb Auto merge of #62902 - Mark-Simulacrum:rollup-mxfk0mm, r=Mark-Simulacrum
Rollup of 14 pull requests

Successful merges:

 - #60951 (more specific errors in src/librustc/mir/interpret/error.rs)
 - #62523 (Delay bug to resolve HRTB ICE)
 - #62656 (explain how to search in slice without owned data)
 - #62791 (Handle more cases of typos misinterpreted as type ascription)
 - #62804 (rustc_typeck: improve diagnostics for _ const/static declarations)
 - #62808 (Revert "Disable stack probing for gnux32.")
 - #62817 (Tweak span for variant not found error)
 - #62842 (Add tests for issue-58887)
 - #62851 (move unescape module to rustc_lexer)
 - #62859 (Place::as_place_ref is now Place::as_ref)
 - #62869 (add rustc_private as a proper language feature gate)
 - #62880 (normalize use of backticks in compiler messages for librustc_allocator)
 - #62885 (Change "OSX" to "macOS")
 - #62889 (Update stage0.txt)

Failed merges:

r? @ghost
2019-07-23 19:50:46 +00:00
Samy Kacimi
ca8420c61f
Normalize use of backticks in compiler messages for doc
https://github.com/rust-lang/rust/issues/60532
2019-07-23 20:06:00 +02:00
Samy Kacimi
2083a123a5
Normalize use of backticks in compiler messages for libsyntax/*
https://github.com/rust-lang/rust/issues/60532
2019-07-23 20:03:20 +02:00
Nathan
b70f217262 Use raw pointers in std::sys::cloudabi when passing MaybeUninit values 2019-07-23 13:51:28 -04:00
Nathan
0ac6afafa6 Cleanup std::sys::cloudabi 2019-07-23 13:49:37 -04:00
Mark Rousskov
c939db7404
Rollup merge of #62889 - git-iso:patch-1, r=jonas-schievink
Update stage0.txt

Grammar.
2019-07-23 12:51:22 -04:00
Mark Rousskov
f1b267bef4
Rollup merge of #62885 - atouchet:macos, r=alexcrichton
Change "OSX" to "macOS"

Apple no longer uses the OS X branding.
2019-07-23 12:51:21 -04:00
Mark Rousskov
32e5f985eb
Rollup merge of #62880 - fakenine:normalize_use_of_backticks_compiler_messages_p14, r=Centril
normalize use of backticks in compiler messages for librustc_allocator

https://github.com/rust-lang/rust/issues/60532
2019-07-23 12:51:19 -04:00
Mark Rousskov
f11ffd3a6a
Rollup merge of #62869 - matklad:feature-gate, r=Mark-Simulacrum
add rustc_private as a proper language feature gate

At the moment, `rustc_private` as a (library) feature exists by
accident: `char::is_xid_start`, `char::is_xid_continue` methods in
libcore define it.

cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/How.20to.20declare.20new.20langauge.20feature.3F

I don't know if this is at all reasonable, but at least tests seem to pass locally. That probably means that we can remove/rename to something more resonable the feature in libcore in the next release?
2019-07-23 12:51:18 -04:00
Mark Rousskov
b2155dd747
Rollup merge of #62859 - spastorino:rename-to-as-ref, r=Centril
Place::as_place_ref is now Place::as_ref

r? @oli-obk
2019-07-23 12:51:16 -04:00
Mark Rousskov
4cb3586db9
Rollup merge of #62851 - matklad:unescape, r=petrochenkov
move unescape module to rustc_lexer

It makes sense to keep the definition of escape sequences closer to the lexer itself, and it is also a bit of code that I would like to share with rust-analyzer.

r? @petrochenkov
2019-07-23 12:51:15 -04:00
Mark Rousskov
8afc53c195
Rollup merge of #62842 - JohnTitor:test-for-58887, r=alexreg
Add tests for issue-58887

Closes #58887
2019-07-23 12:51:13 -04:00
Mark Rousskov
24a8065c30
Rollup merge of #62817 - estebank:variant-sp, r=matthewjasper
Tweak span for variant not found error
2019-07-23 12:51:12 -04:00
Mark Rousskov
66c2965ac2
Rollup merge of #62808 - crlf0710:gnux32_stack_probe, r=nikic
Revert "Disable stack probing for gnux32."

This reverts commit 42d652ecd6. (#59686)

Closes #59674.
2019-07-23 12:51:10 -04:00
Mark Rousskov
13775d2304
Rollup merge of #62804 - lundibundi:help-infer-const-static, r=eddyb
rustc_typeck: improve diagnostics for _ const/static declarations

This continues https://github.com/rust-lang/rust/pull/62694 and adds type suggestions to const/static declarations with `_` type.

r? @eddyb
2019-07-23 12:51:09 -04:00
Mark Rousskov
ab7149bdc5
Rollup merge of #62791 - estebank:type-ascription, r=petrochenkov
Handle more cases of typos misinterpreted as type ascription

Fix #60933, #54516.

CC #47666, #34255, #48016.
2019-07-23 12:51:07 -04:00
Mark Rousskov
4264f8376a
Rollup merge of #62656 - RalfJung:contains-no-own, r=Dylan-DPC
explain how to search in slice without owned data

Cc https://github.com/rust-lang/rust/issues/62367
2019-07-23 12:51:05 -04:00
Mark Rousskov
ad575978af
Rollup merge of #62523 - pnkfelix:delay-bug-to-resolve-issue-62203-ice, r=varkor
Delay bug to resolve HRTB ICE

Fix #62203
2019-07-23 12:51:04 -04:00
Mark Rousskov
52e9e44c7f
Rollup merge of #60951 - saleemjaffer:mir_better_error_enum, r=oli-obk
more specific errors in src/librustc/mir/interpret/error.rs

Implements [this](https://github.com/rust-rfcs/const-eval/issues/4)
2019-07-23 12:51:02 -04:00
bors
299ef86e1f Auto merge of #62823 - RalfJung:miri, r=oli-obk
update Miri

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

r? @oli-obk @eddyb
2019-07-23 15:55:26 +00:00