Auto merge of #59879 - ebarnard:patch-1, r=alexcrichton
Add a comment explaining why SecRandomCopyBytes is not used on MacOS
SecRandomCopyBytes is [available since MacOS 10.7](https://developer.apple.com/documentation/security/1399291-secrandomcopybytes?language=objc) which is the minimum supported version and which was suggested in https://github.com/rust-lang/rust/pull/58901#issuecomment-470188115 is the earliest version currently in use.
This matches the behaviour of other platforms which have a random number generator syscall available.
Auto merge of #59769 - RalfJung:compiletest-normalization, r=alexcrichton
compiletest normalization: preserve non-JSON lines such as ICEs
Currently, every non-JSON line from stderr gets normalized away when compiletest normalizes the output. In particular, ICEs get normalized to the empty output. That does not seem desirable, so this changes normalization to preserve non-JSON lines instead.
Also see https://github.com/laumann/compiletest-rs/issues/169: because of that bug, Miri currently *looks* green in the toolstate, but some tests ICE. That same bug is likely no longer present in latest compiletest because the error code gets checked separately, but it still seems like a good idea to also make sure that ICEs are considered stderr output:
This change found an accidental user-visible `error!` in CTFE validation (fixed), and a non-deterministic panic when there are two `main` symbols (not fixed, no idea where this comes from). Both got missed before because non-JSON output got ignored.
Rollup merge of #59992 - QuietMisdreavus:static-settings-path, r=GuillaumeGomez
rustdoc: use --static-root-path for settings.js
At the time i was writing https://github.com/rust-lang/docs.rs/pull/332, i noticed that the `settings.js` file that was being loaded was not being loaded from the `--static-root-path`. This PR fixes that so that users on docs.rs can effectively cache this file.
Rollup merge of #59973 - Enity:fix-rustdoc-sidebar, r=GuillaumeGomez
Fix rustdoc sidebar z-index
I think the screenshot will say everything:
![image](https://user-images.githubusercontent.com/2884517/56098429-37fa3680-5f09-11e9-8c54-4e2548aa0818.png)
live example: https://docs.rs/nom/4.2.3/nom/
I chose the smallest z-index to avoid problems with other blocks.
Auto merge of #59926 - pietroalbini:android-sdk-manager, r=alexcrichton
ci: use a custom android sdk manager with pinning and mirroring
Google's own sdkmanager has two issues that make it unsuitable for us:
* Mirroring has to be done manually, which is annoying because we need to figure out on our own all the URLs to copy (I couldn't find any documentation when building this PR, had to use mitmproxy).
* There is no support for pinning, which means an update on Google's side can break our CI, as it happened multiple times.
This PR replaces all our usage of sdkmanager with a custom Python script which mimics its behavior, but with the two issues fixes.
sdkmanager's logic for installing packages is thankfully very simple: the package name (like `system-images;android-18;default;armeabi-v7a`) is the directory where the package should live (with `;` replaced with `/`), so to install a package we only need to extract its contents in the right directory.
r? @alexcrichton
cc @kennytm
fixes https://github.com/rust-lang/rust/issues/59778
Auto merge of #59991 - Centril:rollup-bqxt4w3, r=Centril
Rollup of 6 pull requests
Successful merges:
- #59648 (Add must_use annotations to Result::is_ok and is_err)
- #59748 (Add summary and reference to Rust trademark guide)
- #59779 (Uplift `get_def_path` from Clippy)
- #59955 (bump stdsimd; make intra_doc_link_resolution_failure an error again; make lints more consistent)
- #59978 (rustdoc: Remove default keyword from re-exported trait methods)
- #59989 (Fix links to Atomic* in RELEASES.md)
Rollup merge of #59955 - RalfJung:stdsimd, r=alexcrichton
bump stdsimd; make intra_doc_link_resolution_failure an error again; make lints more consistent
I made `intra_doc_link_resolution_failure` warn so that it would properly respect `deny-warnings = false` in `config.toml`. `#[warn]` still become errors with `-D warnings` so I thought this was fine.
Turns out however that we don't pass `-D warnings` when running rustdoc, so for additional rustdoc-lints we need to set them to `deny`.
Also sue the opportunity to make the lint flags more consistent between libcore, liballoc, libstd.
Rollup merge of #59779 - flip1995:uplift_get_def_path, r=Manishearth
Uplift `get_def_path` from Clippy
cc rust-lang/rust-clippy#3926
cc #59738
This uplifts `get_def_path` from Clippy. This is a follow up on the
implementation of internal lints: #59316
The internal lint implementation also copied the implementation of the
`AbsolutePathPrinter`. To get rid of this code duplication this also
uplifts the `get_def_path` function from Clippy.
This also renames `match_path` to `match_def_path`, as it was originally
named in Clippy.
Auto merge of #59335 - Aaron1011:fix/extern-priv-final, r=Aaron1011
Properly parse '--extern-private' with name and path
It turns out that https://github.com/rust-lang/rust/pull/57586 didn't properly parse `--extern-private name=path`.
This PR properly implements the `--extern-private` option. I've added a new `extern-private` option to `compiletest`, which causes an `--extern-private` option to be passed to the compiler with the proper path.
Part of https://github.com/rust-lang/rust/issues/44663
Rollup merge of #59936 - petrochenkov:confict, r=davidtwco
Fix cross-crate visibility of fictive variant constructors
After merging https://github.com/rust-lang/rust/pull/59376 I realized that the code in the decoder wasn't entirely correct - we "decoded" fictive variant constructors with their variant's visibility, which could be public, rather than demoted to `pub(crate)`.
Fictive constructors are not directly usable in expression/patterns, but the effect still can be observed with imports.
Rollup merge of #59856 - albins:update-polonius, r=nikomatsakis
update polonius-engine
This updates polonius-engine to [version 0.7.0](https://github.com/rust-lang/polonius/blob/master/RELEASES.md#v070), which adds a hybrid algorithm that starts off with performing a cheaper, location-insensitive analysis before proceeding with the full analysis.
Auto merge of #59693 - nnethercote:64-bit-Spans, r=petrochenkov
Increase `Span` from 4 bytes to 8 bytes.
This increases the size of some important types, such as `ast::Expr` and
`mir::Statement`. However, it drastically reduces how much the interner
is used, and the fields are more natural sizes that don't require bit
operations to extract.
As a result, instruction counts drop across a range of workloads, by as
much as 10% for `script-servo` incremental builds.
Peak memory usage goes up a little for some cases, but down by more for
some other cases -- as much as 18% for non-incremental builds of
`packed-simd`.
The commit also:
- removes the `repr(packed)`, because it has negligible effect, but can
cause undefined behaviour;
- replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.)
with derived ones.
(My intention is that someone can re-add this code again later, either after the `ld.gold` issue itself is fixed, or with safe-guards to check whether `ld.gold` is in use and then issuing warnings about the problems here when they arise.)
Rollup merge of #59874 - michaelwoerister:pgo-updates-1, r=cramertj
Clean up handling of `-Z pgo-gen` commandline option.
This PR adapts the `-Z pgo-gen` flag to how Clang and GCC handle the corresponding `-fprofile-generate` flag. In particular, the flag now optionally takes a directory to place the profiling data in and allows to omit the argument (instead of having to pass an empty string).
Rollup merge of #59812 - michaelwoerister:profile-gen-msvc-imp, r=alexcrichton
Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.
LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime. Since these show up as globals in the LLVM IR, the compiler generates `dllimport`-related `__imp_` stubs for them. This can lead to linker errors because the instrumentation symbols have weak linkage or are in a comdat section, but the `__imp_` stubs aren't.
Instead of trying to replicate the linkage/comdat setup for the stubs, this PR just excludes the profiler-related symbols from stub-generation since they aren't supposed to be referenced via `__declspec(dllimport)` anywhere anyway.
r? @alexcrichton
EDIT: I considered making this more general, i.e. inferring from the symbol name if it is a Rust symbol or not. But then I figured out that that would yield false negatives for `#[no_mangle]` et al, so I went with a blacklist approach.