Stabilize the type_name intrinsic in core::any
Stabilize `type_name` in `core::any`.
Closesrust-lang/rfcs#1428
FCP completed over there.
`RELEASES.md`: Prefer T-libs for categorization.
Attempt to create sockets with the WSA_FLAG_NO_HANDLE_INHERIT flag, and
handle the potential error gracefully (as the flag isn't support on
Windows 7 before SP1)
So far it is assumed that using a DLL as a -l parameter argument is ok,
but the assumption doesn't hold when compiling the native code with
llvm.
In which case, an import library is required, so let's build one
This also requires the cargo counterpart to add the import library in
the stamp files, at least when compiling libstd. Otherwise, the files
don't get uplifted
Rename .cap() methods to .capacity()
As mentioned in #60316, there are a few `.cap()` methods, which seem out-of-place because such methods are called `.capacity()` in the rest of the code.
This PR renames them to `.capacity()` but leaves `RawVec::cap()` in there for backwards compatibility.
I didn't try to mark the old version as "deprecated", because I guess this would cause too much noise.
In PR #62435 ("Use const generics for array impls [part 1]") the old
macro-based implementations were not removed but still used with
`cfg(bootstrap)` since the bootstrap compiler had some problems with
const generics at the time. This does not seem to be the case anymore,
so there is no reason to keep the old code.
Unfortunately due to an Azure quirk the TOOLSTATE_REPO_ACCESS_TOKEN is
not suitable to gate whether to push new commits to the repo, as if it's
not defined on the Azure side it will actually be set to the literal
`$(TOOLSTATE_REPO_ACCESS_TOKEN)`, which screws everything up.
This instead adds another, non-secret environment variable to gate
publishing: TOOLSTATE_PUBLISH. As non-secret environment variables
behave correctly this fixes the issue.
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)
r? @ghost
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.
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
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.
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
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
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