Auto merge of #62961 - Centril:rollup-kydeswa, r=Centril
Rollup of 9 pull requests
Successful merges:
- #61727 (Add binary dependencies to dep-info files)
- #62736 (Polonius: fix some cases of `killed` fact generation, and most of the `ui` test suite)
- #62758 (ci: Install clang on Windows through tarballs)
- #62784 (Add riscv32i-unknown-none-elf target)
- #62814 (add support for hexagon-unknown-linux-musl)
- #62827 (Don't link mcjit/interpreter LLVM components)
- #62901 (cleanup: Remove `extern crate serialize as rustc_serialize`s)
- #62903 (Support SDKROOT env var on iOS)
- #62906 (Require a value for configure --debuginfo-level)
Failed merges:
- #62910 (cleanup: Remove lint annotations in specific crates that are already enforced by rustbuild)
Rollup merge of #62906 - cuviper:debuginfo-level, r=Mark-Simulacrum
Require a value for configure --debuginfo-level
In `configure.py`, using the `o` function creates an enable/disable
boolean setting, and writes `true` or `false` in `config.toml`. However,
rustbuild is expecting to parse a `u32` debuginfo level. We can change
to the `v` function to have the options require a value.
Rollup merge of #62903 - swolchok:ios-sdkroot, r=alexcrichton
Support SDKROOT env var on iOS
Following what clang does (https://github.com/llvm/llvm-project/blob/296a80102a9b72c3eda80558fb78a3ed8849b341/clang/lib/Driver/ToolChains/Darwin.cpp#L1661-L1678), allow allow SDKROOT to tell us where the Apple SDK lives so we don't have to invoke xcrun.
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.
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:
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.
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)
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)
Josh Stone [Tue, 23 Jul 2019 19:04:31 +0000 (12:04 -0700)]
Require a value for configure --debuginfo-level
In `configure.py`, using the `o` function creates an enable/disable
boolean setting, and writes `true` or `false` in `config.toml`. However,
rustbuild is expecting to parse a `u32` debuginfo level. We can change
to the `v` function to have the options require a value.
Mark Rousskov [Tue, 23 Jul 2019 16:51:18 +0000 (12:51 -0400)]
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?
Mark Rousskov [Tue, 23 Jul 2019 16:51:15 +0000 (12:51 -0400)]
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.
Auto merge of #62873 - Centril:rollup-ncnuelj, r=Centril
Rollup of 14 pull requests
Successful merges:
- #62709 (Test that maplike FromIter satisfies uniqueness)
- #62713 (Stabilize <*mut _>::cast and <*const _>::cast)
- #62746 ( do not use assume_init in std::io)
- #62787 (Fix typo in src/libstd/net/udp.rs doc comment)
- #62788 (normalize use of backticks in compiler messages for libcore/ptr)
- #62799 (use const array repeat expressions for uninit_array)
- #62810 (normalize use of backticks in compiler messages for librustc_lint)
- #62812 (normalize use of backticks in compiler messages for librustc_metadata)
- #62832 (normalize use of backticks in compiler messages for librustc_incremental)
- #62845 (read: fix doc comment)
- #62853 (normalize use of backticks in compiler messages for librustc/hir)
- #62854 (Fix typo in Unicode character name)
- #62858 (Change wrong variable name.)
- #62870 (fix lexing of comments with many \r)
Rollup merge of #62854 - andrewda:fix-unicode-name, r=petrochenkov
Fix typo in Unicode character name
There's a small typo in the Unicode character definitions: "Latin Epigraphic Letter Dideways" should be "Latin Epigraphic Letter Sideways I" (see [here](https://www.compart.com/en/unicode/U+A7F7)).
Rollup merge of #62799 - RalfJung:uninit-array, r=Centril
use const array repeat expressions for uninit_array
With a first implementation of https://github.com/rust-lang/rust/issues/49147 having landed, we can make this macro nicer and phase it out with the next bootstrap bump.
However, to make this work, we have to mark `MaybeUninit::uninit()` as promotable. I do feel uneasy about promoting stuff involving uninitialized memory, but OTOH no *operation* on `MaybeUninit` is promotable, so maybe this is okay?
Rollup merge of #62709 - nhynes:test-maplike-fromiter, r=cuviper
Test that maplike FromIter satisfies uniqueness
This PR adds a simple assertion to the `HashMap` and `HashSet` tests to ensure that uniqueness is satisfied when `FromIter`ing. This is useful for people who want to test their custom type against the Map/Set interfaces since they'll copy the tests wholesale but possibly miss this bug (where _they_ = _me_).