It might happen that a synthetic target name does not match one of the
hardcoded ones in std's build script, causing std to fail to build. This
commit changes the std build script avoid including the restricted-std
feature unconditionally when a synthetic target is being built.
Some targets are added to these hashmaps at runtime, and are not present
during dry runs. To avoid errors, this commit changes all the related
functions to always return empty strings/paths during dry runs.
Dont compute `opt_suggest_box_span` span for TAIT
Fixes#112434
Also a couple more commits on top, pruning some dead code and fixing another weird suggestion encountered in the above issue.
This has real differences in the effective debuginfo: in particular, it omits the module-level information and breaks perf.
Allow passing `line-tables-only` directly in config.toml instead.
rustdoc: Add `item_template` macro
Closes#112021
This change removes the use of `self.borrows()` in Askama templates, removes code duplication from `item_and_mut_cx()`, and improved readability by eliminating the prefix `item_template_` when calling from the template.
References:
- Discussion issue: https://github.com/rust-lang/rust/issues/112021
- `ItemTemplate` PR: https://github.com/rust-lang/rust/pull/111946
r? `@GuillaumeGomez`
Rollup of 7 pull requests
Successful merges:
- #112475 (Fix issue for module name when surround the struct literal with parentheses)
- #112477 (Give more helpful progress messages in `Assemble`)
- #112484 (Fix ntdll linkage issues on Windows UWP platforms)
- #112492 (Migrate GUI colors test to original CSS color format)
- #112493 (iat selection: normalize self ty & completely erase bound vars)
- #112497 (abs_sub: fix typo 0[-:][+.]0)
- #112498 (Update links to Rust Reference in diagnostic)
r? `@ghost`
`@rustbot` modify labels: rollup
iat selection: normalize self ty & completely erase bound vars
Erase bound vars (most notably late-bound regions) irrespective of their binding level instead of just at the innermost one.
Fixes#111404.
Fix ntdll linkage issues on Windows UWP platforms
See discussion: https://github.com/rust-lang/rust/issues/112265#issuecomment-1575479683
Static loading `ntdll` functions does not work for UWP programs, which will end up link errors complaining about missing symbols, or failure to pass the WACK tests. The breakage was introduced in #108262.
This PR basically reverts part of the changes in #108262 for UWP only, and fixes some lint suggestions.
Give more helpful progress messages in `Assemble`
Before (download-rustc):
```
# no output
```
After (download-rustc):
```
Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`)
```
Before (compiling from source):
```
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Assembling stage1 compiler
Build stage1 library artifacts (x86_64-unknown-linux-gnu -> i686-unknown-linux-gnu)
Building compiler artifacts (stage0:x86_64-unknown-linux-gnu -> stage1:i686-unknown-linux-gnu)
Assembling stage1 compiler (i686-unknown-linux-gnu)
```
After (compiling from source):
```
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Build stage1 library artifacts (x86_64-unknown-linux-gnu)
Building compiler artifacts (stage0:x86_64-unknown-linux-gnu -> stage1:i686-unknown-linux-gnu)
Creating a sysroot for stage1 compiler (i686-unknown-linux-gnu) (use `rustup toolchain link 'name' build/i686-unknown-linux-gnu/stage1`)
```
cc https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Unable.20to.20compile.20rustc.20MSVC, https://discord.com/channels/273534239310479360/957720175619215380/1116867245499498506
Don't compile rustc to self-test compiletest
This was changed from stage 0 to 1 in https://github.com/rust-lang/rust/pull/108905, but I'm not sure why. Change it to `top_stage` instead to allow people to choose the stage.
This should save quite a bit of time in the `mingw-check` builder, which explicitly runs `x test --stage 0 compiletest`.
Note that this also fixes a latent bug that depended on running `x build compiler` before `x doc compiler`, as well as a couple cleanups related to symlinks (which made the latent bug easier to find).
cc `@pietroalbini`