Rollup merge of #60037 - eddyb:actually-its-param, r=estebank
Resolve inconsistency in error messages between "parameter" and "variable".
The inconsistency was introduced in 104fe1c4db24f860b890dfd25577f23ee111279a (#33619), when a label saying `type variable` was added to an error with a message talking about `type parameters`.
Given that `parameter` is far more prevalent when referring to generics in the context of Rust, IMO it should be that in both the message and the label.
Rollup merge of #59984 - gluyas:collections-with_capacity-doc-fix, r=rkruppe
Remove collection-specific `with_capacity` documentation from `std::collections`
Fixes #59931
The style of `std::collections` module doc is very much a beginner friendly guide, and documenting niche, collection-specific behaviour feels out of place, if not brittle.
The note about `VecDeque` is outdated (see issue), and while `Vec` probably won't change its guarantees any time soon, the users who are interested in its allocation properties will find that in its own documentation.
Auto merge of #59527 - matklad:sized-index, r=Centril
Add test checking that Index<T: ?Sized> works
I've noticed that we have an `Idx: ?Sized` bound on the **index** in the `Index`, which seems strange given that we accept index by value. My guess is that it was meant to be removed in https://github.com/rust-lang/rust/pull/23601, but was overlooked.
If I remove this bound, `./x.py src/libstd/ src/libcore/` passes, which means at least that this is not covered by test.
I think there's three things we can do here:
* run crater with the bound removed to check if there are any regressions, and merge this, to be consistent with other operator traits
* run crater, get regressions, write a test for this with a note that "hey, we tried to fix it, its unfixable"
* decide, in the light of by-value DSTs, that this is a feature rather than a bug, and add a test
cc @rust-lang/libs
EDIT: the forth alternative is that there exist a genuine reason why this is the case, but I failed to see it :D
Auto merge of #60030 - Centril:rollup-3d0t24t, r=Centril
Rollup of 5 pull requests
Successful merges:
- #59128 (Emit ansi color codes in the `rendered` field of json diagnostics)
- #59646 (const fn: Improve wording)
- #59986 (Miri: refactor new allocation tagging)
- #60003 (LLD is not supported on Darwin)
- #60018 (Miri now supports entropy, but is still slow)
Rollup merge of #59986 - RalfJung:miri-new-alloc, r=oli-obk
Miri: refactor new allocation tagging
Tagging and initializing `AllocExtra` now go hand-in-hand so one cannot forget to do one when doing the other. In particular, `memory.allocate` is now much easier to use correctly (because it will already return a tagged pointer).
Auto merge of #60027 - jethrogb:jb/sgx-reentry-abort, r=cramertj
SGX target: change re-entry abort logic
Even though re-entry after exit is generally not acceptable, there is a race condition where the enclave thinks it's exited but userspace doesn't know that yet. An entry during that time will currently result in an enclave panic (see https://github.com/rust-lang/rust/pull/59997#issuecomment-483846291, https://github.com/rust-lang/rust/pull/60003#issuecomment-483888170). Instead of panicking, just do a regular exit on re-entry.
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