[rustdoc] stabilize cfg(doctest)
Fixes#62210.
Since we removed rustdoc from providing cfg(test) on test runs, it's been replaced by cfg(doctest). It'd be nice to have it in not too far in the future.
ci: revert msys2 ca-certificates hack
The hack was added because upstream msys2 broke the ca-certificates package, but since then it has been fixed. This reverts CI to use the upstream package.
Part of #65767
Update comments re type parameter hack in object safety
To check if a method's receiver type is object safe, we create a new receiver type by substituting in a bogus type parameter (let's call it `U`) for `Self`, and checking that the unmodified receiver type implements `DispatchFromDyn<receiver type with Self = U>`. It would be better to use `dyn Trait` directly, and the only reason we don't is because it triggers another check that `Trait` is object safe, resulting in a query cycle. Once the feature `object_safe_for_dispatch` (tracking issue https://github.com/rust-lang/rust/issues/43561) is stabilized, this will no longer be the case, and we'll be able to use `dyn Trait` as the unsized `Self` type. I've updated the comments in object_safety.rs accordingly.
cc @Centril @nikomatsakis @bovinebuddha
Upload toolstates.json to rust-lang-ci2
This PR does two things:
* Following up with https://github.com/rust-lang/rust/pull/65202, it migrates deploying artifacts to CI in a script. Both uploading release artifacts and CPU stats were merged into the same script, designing it to be easily extended.
* Uploads the toolstate JSON to `rust-lang-ci2` along with the release artifacts, both for Linux and Windows. This is needed because @RalfJung wants to stop shipping MIRI when its tests are failing, and the toolstate repo doesn't have entries for each commit. Having the toolstate data (just for that specific commit) on `rust-lang-ci2` will simplify the code a lot.
r? @alexcrichton
cc @RalfJung
submodules: Bump RLS to 58869107ec162a821a4bee53cdd3f51c84cda3ea
Most importantly it contains d267b49c2f which fixes the RLS build whenever Clippy is built successfully in Rust CI.
Closes#65944
r? @ghost
Before this commit toolstates.json was stored in /tmp and it wasn't
mounted outside the build container. That caused uploading the file in
the upload-artifacts task to fail, as the file was missing on the host.
Mounting /tmp/toolstates.json alone is not the best approach: if the
file is missing when the container is started the Docker engine will
create a *directory* named /tmp/toolstates.json.
The Docker issue could be solved by pre-creating an empty file named
/tmp/toolstates.json, but doing that could cause problems if bootstrap
fails to generate the file and the toolstate scripts receive an empty
JSON.
The approach I took in this commit is to instead mount a /tmp/toolstate
directory inside Docker, and create the toolstates.json file in it. That
also required a small bootstrap change to ensure the directory is
created if it's missing.
The hack was added because upstream msys2 broke the ca-certificates
package, but since then it has been fixed. This reverts CI to use the
upstream package.
Rollup of 12 pull requests
Successful merges:
- #65405 (Create new error E0742 and add long error explanation)
- #65539 (resolve: Turn the "non-empty glob must import something" error into a lint)
- #65724 (ci: refactor pr tools job skipping)
- #65741 (Prevent help popup to disappear when clicking on it)
- #65832 (Re-enable Emscripten's exception handling support)
- #65843 (Enable dist for MIPS64 musl targets)
- #65898 (add basic HermitCore support within libtest)
- #65900 (proc_macro: clean up bridge::client::__run_expand{1,2} a bit.)
- #65906 (Update mdbook to 0.3.3)
- #65920 (Use rustc-workspace-hack for rustbook)
- #65930 (doc: use new feature gate for c_void type)
- #65936 (save-analysis: Account for async desugaring in async fn return types)
Failed merges:
- #65434 (Add long error explanation for E0577)
r? @ghost
save-analysis: Account for async desugaring in async fn return types
Closes#65590
When visiting the return type of an async function we need to take into account its desugaring, since it introduces a new definition under which the return type is redefined.
r? @nikomatsakis
Use rustc-workspace-hack for rustbook
As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).
proc_macro: clean up bridge::client::__run_expand{1,2} a bit.
See commit titles/diffs for more details.
The first commit is made possible by #53451 being fixed (almost a year ago).
The last commit should remove the need for `#[allow(improper_ctypes)]` in #65134.
Re-enable Emscripten's exception handling support
Passes LLVM codegen and Emscripten link-time flags for exception
handling if and only if the panic strategy is `unwind`. Sets the
default panic strategy for Emscripten targets to `unwind`. Re-enables
tests that depend on unwinding support for Emscripten, including
`should_panic` tests.
r? @alexcrichton
ci: refactor pr tools job skipping
We have a job in our CI (PR's x86_64-gnu-tools) that's supposed to run only when a submodule is changed in the PR, and it works by having a task at the start of the build that skips all the following tasks if the condition isn't met.
Before this commit that task was gated with template parameters, which is a unique feature of Azure Pipelines. To make our CI more generic this commit switches the gate to use a simple environment variable plus a condition, which should be supported on more CI providers.
This PR also extracts the skipping logic into a script.
r? @alexcrichton
resolve: Turn the "non-empty glob must import something" error into a lint
This fixes#62334 by changing the error to a lint warning the glob. I changed the test but I'm very unsure of what I did as I do not know how to correctly check for the warning
submodules: update clippy from 66df92ae to c8e3cfbd
Changes:
````
travis: temporarily disable rustfmt ci check until #4742 is resolved
rustup https://github.com/rust-lang/rust/pull/65792/
Fix ICE #4579
Add regression test for ICE #4579
Run update_lints for Unicode lint
Re-add false positive check
Add raw string regression test for useless_format lint
Re-factor useless_format lint
Update Unicode lint tests
[Backported] Rustup to https://github.com/rust-lang/rust/pull/59545
````
Fixes#65888
r? @oli-obk @Manishearth