Running UI tests now takes a huge amount of time on mingw builders
(between 40 and 50 minutes), with mingw-1 builders taking even an hour
less to finish than mingw-2. This PR moves linkcheck from mingw-2 to
mingw-1, removing between 10 and 20 minutes of runtime on the -2
builders.
Utilize -Zbinary-dep-depinfo in rustbuild
We no longer utilize stamp-file mtimes at all inside rustbuild, and a future PR may be able to entirely eliminate them by eagerly copying to the appropriate sysroot. The only mtime-based dependency tracking left is for documentation because we lie to Cargo about the rustdoc binary, so Cargo does not track changes to the real binary, and codegen-backends because binary-dep-depinfo does not emit that information into the depfiles.
Both of these are fixable in the longer term but this existing patch gives us the following benefits:
* We no longer delete Cargo target directories manually within a stage. Cross-stage, changes to codegen backends will still clear out target directories. This means that incremental state persists across individual steps (e.g., rebuilding libstd does not clear out librustc incremental state). Fixes#54712.
* Dependency tracking across steps within a given stage is now fully precise. We will not clear out all codegen backend dependencies due to changes in librustc_driver, for example, only deleting the final librustc_codegen_llvm crate. Fixes#54008, fixes#50481.
* We properly track codegen backends as a dependency (equivalent to rustc) across changes. Fixes#53284, and fixes#52719.
* Cross-stage dependency tracking of crates is also much more accurate and reliable. Most likely fixes#49979 (but no reproduction steps in that issue). Fixes#59105.
cc #63012
Rollup of 7 pull requests
Successful merges:
- #62593 (Group all ABI tests.)
- #63173 (Use libunwind from llvm-project submodule for musl targets)
- #63535 (Continue refactoring resolve and hygiene)
- #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
- #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)
- #63612 (Do not suggest `try_into` for base types inside of macro expansions)
- #63615 (Fix typo in DoubleEndedIterator::nth_back doc)
Failed merges:
r? @ghost
Suggest Rust 2018 on `<expr>.await` with no such field
When type checking a field projection (`fn check_field`) to `<expr>.await` where `<expr>: τ` and `τ` is not a primitive type, suggest switching to Rust 2018. E.g.
```
error[E0609]: no field `await` on type `std::pin::Pin<&mut dyn std::future::Future<Output = ()>>`
--> $DIR/suggest-switching-edition-on-await.rs:31:7
|
LL | x.await;
| ^^^^^ unknown field
|
= note: to `.await` a `Future`, switch to Rust 2018
= help: set `edition = "2018"` in `Cargo.toml`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
```
Fixes https://github.com/rust-lang/rust/issues/63533
This PR also performs some preparatory cleanups in `fn check_field`; the last 2 commits are where the suggestion is introduced and tested respectively.
r? @varkor
Continue refactoring resolve and hygiene
The general goal is addressing FIXMEs from the previous PRs.
Merging similar data structures (+ prerequisites for such merging), accounting for the fact that all `ExpnId`s have associated data in `HygieneData` now (less `Option`s).
Also, some renaming.
This should be the last renaming session in this area, I think.
r? @matthewjasper
Currently, librustc_llvm builds are not reproducible because the LLVM
files it compiles use the debug version of llvm_unreachable, which
uses __FILE__. To fix this, we propagate NDEBUG from bootstrap if
applicable and use it when compiling librustc_llvm.
The previous approach was brittle - what would happen if `ParentScope` wasn't created by `invoc_parent_scope`?
That's exactly the case for various uses of `ParentScope` in diagnostics and in built-in attribute validation.
Traces already contain module info without that.
It's easy to forget to call `finalize_*` on a module.
In particular, macros enum and trait modules weren't finalized.
By happy accident macros weren't placed into those modules until now.