Skip to content

Rollup of 14 pull requests - #160954

Merged
rust-bors[bot] merged 36 commits into
rust-lang:mainfrom
jhpratt:rollup-Rlls6YC
Aug 12, 2026
Merged

Rollup of 14 pull requests#160954
rust-bors[bot] merged 36 commits into
rust-lang:mainfrom
jhpratt:rollup-Rlls6YC

Conversation

@jhpratt

@jhpratt jhpratt commented Aug 12, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mati865 and others added 30 commits August 6, 2026 11:47
This commit adjusts the changes made in 159733. A wasi-libc bug was
discovered in 160828 which is present in certain situations which means
that the changes in 159733 expose this bug. The purpose of this PR is
to get wasip1/wasip2 targets fixed again while preserving a working
implementation for wasip3. This upstream bug is already fixed in
wasi-libc meaning that this PR won't be necessary once wasi-sdk-34 is
published and used in rust-lang/rust. Until that time, however, this
effectively reverts 159733 for wasip1/wasip2. The wasip3 target is Tier
3 still and requires wasi-sdk-34 anyway which is why that's left
unchanged.

Closes 160828
the previous version, v0.5.0 (from 2018), does not include a
Cargo lockfile which makes the test brittle as bugs and unintentional
breaking changes in any new release of a dependency can make the test fail

the newly chosen version, v0.7.7, includes a Cargo lockfile
This is currently not really implemented, but partial support for it is
added in various places across the tree. This is a patch extracted from
the wider set of work to make review easier, which wires up:

* Unstable flag in rustc
* Bootstrap flag to enable using wasm-proc-macros (this needs an extra
  std compilation, wiring into compiletest)
* Partial compiletest support for the flag (mostly just CLI side of things)
Simply replace the parameter name and `#[rustc_splat]` attribute with an ellipsis. This preserves the type information of the splat while still documenting the variadic nature of the function.
Do not pass `-no-pie` on Windows

The warning can be seen with a simple example:
```
❯ cargo new /tmp/hello -q
❯ cargo rustc --target x86_64-pc-windows-gnullvm -q -- -C target-feature=+crt-static
warning: linker stderr: clang: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
  |
  = note: `#[warn(linker_messages)]` on by default
```
…oboet

Arc: Remove unnecessary fmt::Display use for overflow assertion

- [x] I did not use an LLM to create a change in this PR.
- [ ] I used an LLM to create a change in this PR, and I have explained below how it was used.

This PR removes unnecessary `fmt::Display` generated assembly because of use of formatting in the overflow check assertion(`assert!(n <= MAX_REFCOUNT, "{}", INTERNAL_OVERFLOW_ERROR);`).

This reduces generated x64 assembly for counter increment(simplified) from:
```asm
increase_counter:
        test    rdi, rdi
        js      .LBB1_2
        inc     rdi
        mov     rax, rdi
        ret
.LBB1_2:
        sub     rsp, 24
        lea     rax, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.2]
        mov     qword ptr [rsp + 8], rax
        lea     rax, [rip + <&str as core[4e7ceada952a6ea0]::fmt::Display>::fmt]
        mov     qword ptr [rsp + 16], rax
        lea     rdi, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.0]
        lea     rdx, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.4]
        lea     rsi, [rsp + 8]
        call    qword ptr [rip + core[4e7ceada952a6ea0]::panicking::panic_fmt@GOTPCREL]

.Lanon.642d46026bcfa00bfed8baf8cdbf502d.0:
        .asciz  "\300"

.Lanon.642d46026bcfa00bfed8baf8cdbf502d.1:
        .ascii  "Arc counter overflow"
```

To:
```asm
increase_counter:
        test    rdi, rdi
        js      .LBB0_2
        inc     rdi
        mov     rax, rdi
        ret
.LBB0_2:
        push    rax
        lea     rdi, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.0]
        lea     rdx, [rip + .Lanon.642d46026bcfa00bfed8baf8cdbf502d.2]
        mov     esi, 41
        call    qword ptr [rip + core[4e7ceada952a6ea0]::panicking::panic_fmt@GOTPCREL]

.Lanon.642d46026bcfa00bfed8baf8cdbf502d.0:
        .ascii  "Arc counter overflow"
```

Godbolt link:
https://godbolt.org/z/3qjxooYWM

I expect bors to report a binary size reduction for all programs using Arc. There might also be performance improvements as a byproduct of CPU cache hit increase.
…, r=bjorn3,jieyouxu

Add -Zwasm-proc-macros flag

This is currently not really implemented, but partial support for it is added in various places across the tree. This is a patch extracted from the wider set of work to make review easier, which wires up:

* Unstable flag in rustc
* Bootstrap flag to enable using wasm-proc-macros (this needs an extra std compilation, wiring into compiletest)
* Partial compiletest support for the flag (mostly just CLI side of things)
  * I suspect this will not work across all platforms but based on success with the full patch it should be enough for Linux, I think. I'd rather get them working on at least one platform and then iterate from there, unless we have clear ideas for improvements now.

cc rust-lang#160389 (tracking issue)
cc rust-lang#157590 (more complete implementation)

r? @bjorn3
…, r=clarfonthey

std: Adjust cfgs again for TLS on WASI

This commit adjusts the changes made in rust-lang#159733. A wasi-libc bug was discovered in rust-lang#160828 which is present in certain situations which means that the changes in rust-lang#159733 expose this bug. The purpose of this PR is to get wasip1/wasip2 targets fixed again while preserving a working implementation for wasip3. This upstream bug is already fixed in wasi-libc meaning that this PR won't be necessary once wasi-sdk-34 is published and used in rust-lang/rust. Until that time, however, this effectively reverts rust-lang#159733 for wasip1/wasip2. The wasip3 target is Tier 3 still and requires wasi-sdk-34 anyway which is why that's left unchanged.

Closes rust-lang#160828
…is, r=GuillaumeGomez

Add basic `splat` support to `rustdoc`

Tracking Issue: rust-lang#153629

# Description

While experimenting on variadic `min`/`max`, it was [noted](rust-lang/libs-team#848 (comment)) that the `rustdoc` output for a splatted function is less than ideal. Consider the below:

```rust
pub fn smallest<T: Ord>(#[rustc_splat] vals: impl TupleReduce<Item = T>) -> T {
    // ...
}
```

Currently, this is rendered in `rustdoc` as-is, obfuscating the variadic nature of the function:

<img width="819" height="211" alt="image" src="https://github.com/user-attachments/assets/68569fe6-7285-49f8-aae9-ddad0b10649c" />

## Solution

I've updated the clean `Parameter` type to include whether it is splatted, and overridden the display of that parameter to replace the name with an ellipsis, similar to how fake variadic implementations are displayed.

<img width="820" height="211" alt="image" src="https://github.com/user-attachments/assets/58a27245-cc38-44e6-908a-f67991bcdb64" />

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
rustc-book: update sys-v abi link

Upstream has moved to a new location and the current link is 6 years out of date. See https://github.com/hjl-tools/x86-psABI/
…-cfg, r=Urgau

Add rust_analyzer to check-cfg names

Add rust_analyzer as a known cfg name, set to expect no values
Add test to verify name is recognized and warned on setting a value

Fixes rust-lang#160736

r? @Urgau
@jhpratt

jhpratt commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple-,x86_64-mingw-1,i686-msvc-

@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 329e321 has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 12, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 12, 2026
Rollup of 14 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple-*
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@rust-bors

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 12, 2026
@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

💔 Test for dff5826 failed: CI. Failed job:

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 12, 2026
@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 9m 52s
Pushing 793b589 to main...

@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 6660e28 (parent) -> 793b589 (this PR)

Test differences

Show 450 test diffs

Stage 1

  • [rustdoc-html] tests/rustdoc-html/splat-variadic-ellipsis.rs: [missing] -> pass (J1)

Stage 2

  • [rustdoc-html] tests/rustdoc-html/splat-variadic-ellipsis.rs: [missing] -> pass (J0)

Additionally, 448 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 793b589680f2ad49fab6853e84dbd51c5d84c505 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-stdlib-semver-check: 5m 32s -> 12m 1s (+116.6%)
  2. x86_64-gnu-gcc-core-tests: 7m 4s -> 14m 12s (+100.6%)
  3. i686-gnu-2: 1h 10m -> 1h 39m (+42.2%)
  4. x86_64-gnu-llvm-22-1: 55m 13s -> 1h 13m (+33.8%)
  5. x86_64-gnu-distcheck: 1h 41m -> 2h 14m (+32.0%)
  6. dist-x86_64-llvm-mingw: 1h 29m -> 1h 57m (+31.5%)
  7. x86_64-gnu-nopt: 2h 12m -> 1h 30m (-31.1%)
  8. x86_64-gnu-llvm-21-1: 51m 52s -> 36m 8s (-30.3%)
  9. x86_64-gnu: 1h 57m -> 2h 30m (+28.5%)
  10. dist-powerpc64-linux-gnu: 1h 12m -> 1h 31m (+26.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#160620 Do not pass -no-pie on Windows 80883141c0fe6323e1c5ba61abd7c9799aed50ae (link)
#160731 Arc: Remove unnecessary fmt::Display use for overflow asser… 26d8b69e0eaf0c68cefc03900d7ae11c5b831307 (link)
#160854 Add -Zwasm-proc-macros flag 743c37819fa8e281abdac0633c8741a446c7f47e (link)
#160868 std: Adjust cfgs again for TLS on WASI c34d8021d9f7cd69dd6cf8bffa85eee74c098f10 (link)
#160882 Add basic splat support to rustdoc 389c014774178bcc1cc61c290c31e8931b3908ef (link)
#160894 Allow running an arbitrary number of try jobs per PR eb12cdaa923dc31f56ca0fcd7d5fa9d59bbb4288 (link)
#160790 rustc-book: update sys-v abi link 04bd4207fb5c035a9c18b9d078902b8915646822 (link)
#160878 Add rust_analyzer to check-cfg names 19a44089396ec0ded8a46f9505b19ac82d7ddb34 (link)
#160909 tests/run-make-cargo/thumb-none-cortex-m: bump cortex-m d… 9a23edd48e8fdb3deee1b1e2a256d3d575ab4c4f (link)
#160920 No longer mention the removed generic 90d34499d766817346a315af4a3b432750f042ee (link)
#160921 rustdoc: Fix invalid CSS classes generated for notable items 1596cf69a05e3eac7749817ddad3dd3fa8c57d6b (link)
#160924 split up rustc_session 1dd79ca67a6c83664cf7bbbd34e6417a6a26173d (link)
#160934 Ensure TLS accesses don't call the global allocator through… 5f5cb373f1a7124c484dc7c0e096501472da3aa5 (link)
#160937 Store the names of Fn trait parameters in the AST, fix ru… 093f405e16689b2bd7383c53732aa7db97ed0468 (link)

previous master: 6660e286ea

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (793b589): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -4.2%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [0.4%, 4.2%] 5
Improvements ✅
(primary)
-4.2% [-4.5%, -3.9%] 2
Improvements ✅
(secondary)
-2.3% [-7.2%, -0.5%] 4
All ❌✅ (primary) -4.2% [-4.5%, -3.9%] 2

Cycles

Results (primary 2.4%, secondary 0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
1.0% [0.4%, 4.6%] 23
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.9% [-1.9%, -0.6%] 5
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 460.062s -> 454.866s (-1.13%)
Artifact size: 396.46 MiB -> 396.43 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.