Skip to content

Rollup of 16 pull requests #145728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Aug 22, 2025
Merged

Rollup of 16 pull requests #145728

merged 40 commits into from
Aug 22, 2025

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Aug 21, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

nabijaczleweli and others added 30 commits February 23, 2025 20:22
…gain

This will be faster, and also it deduplicates the code so win/win

The dup() is actually infallible here. But whatever.

Before:
    poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=2, revents=POLLNVAL}])
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
    rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f5749313050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

    poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=0, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
    rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7efe12006050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

    poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
    rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc2dc7ca050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

After:
    poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=1, revents=POLLNVAL}])
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
    rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f488a3fb050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

    poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
    dup(1)                                  = 2
    rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f1a8943c050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

    poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
    openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
    dup(0)                                  = 1
    dup(0)                                  = 2
    rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4e3a4c7050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
While some neon and crypto features may not be supported on the switch at boot (e.g. on the a53 cores), the features will _always_ be available if running as a sysmodule or homebrew application under Horizon/Atmosphere.
This makes it easier to debug issues with MIR building by inserting
dump_for_debugging calls around the suspected code responsible for the
bad MIR.
By using `minicore`, `&raw` and removing use of `link_llvm_intrinsics`
All of these were demoted to tier 3 a while ago and we aren't building
LLVM for them anymore.

Signed-off-by: Jens Reidel <[email protected]>
Consolidate all the panicking functions in `slice/index.rs` to use a single
`slice_index_fail` function, similar to how it is done in `str/traits.rs`.
libstd: init(): dup() subsequent /dev/nulls instead of opening them again

This will be faster, and also it deduplicates the code so win/win

The dup() is actually infallible here. But whatever.

Before:
```
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f5749313050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=0, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7efe12006050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc2dc7ca050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
```

After:
```
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=1, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f488a3fb050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
dup(1)                                  = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f1a8943c050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
dup(0)                                  = 1
dup(0)                                  = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4e3a4c7050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
```
…-multiple-abis-arm, r=RalfJung,davidtwco

c-variadic: multiple ABIs in the same program for arm

similar to rust-lang#144379, but for arm, requested in rust-lang#144066.

Quoting rust-lang/reference#1946 (comment)

> `"aapcs"` specifically refers to the soft-float ABI where floating-point values are passed in integer registers.

However for c-variadic functions, `aapcs` behaves the same as `C`:

https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#65parameter-passing

> A variadic function is always marshaled as for the base standard.

https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#7the-standard-variants

> This section applies only to non-variadic functions. For a variadic function the base standard is always used both for argument passing and result return.

---

I also noticed that rustc currently emit more instructions than clang for c-variadic functions on arm, see https://godbolt.org/z/hMce9rnTh. I'll fix that separately. (edit: rust-lang#144549)

try-job: armhf-gnu
r? `@RalfJung`
…ures, r=wesleywiser

aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).

~~While some NEON and crypto features may not be supported on the Nintendo Switch at boot (e.g. on the a53 cores) and this has not been tested, the features will _always_ be available if running as a sysmodule or homebrew application under Horizon/Atmosphere.~~ EDIT:  the a53 cores are fused out, these features are always available.

This has been tested with local tools personally, as well as building [emuiibo](https://github.com/XorTroll/emuiibo) as it uses both `sha` and `aes` primitives. This was tested using inline assembly in previous versions, and in current versions by using the `aes`, `ctr`, `hmac`, and `sha2` crates.

r? `@jam1garner`

This ended up being much delayed from our discussions about updating this. I tested a number of individual features such as the `aes` and `sha2` target-features directly to avoid a warning message with the `crypto` feature, but that appears to be caused by rust-lang#96472 and is not actually an issue.

There is also a decision to make here about explicitly enabling the `neon` feature. I am in favor of it to be explicit, but it is not necessary as it is already enabled by the `v8a` and `crypto` features. I will defer to your decision as it does not change the actual instructions available for codegen.
…asper

Add a method to dump MIR in the middle of MIR building

This makes it easier to debug issues with MIR building by inserting dump_for_debugging calls around the suspected code responsible for the bad MIR.
…nicking, r=jhpratt

Consolidate panicking functions in `slice/index.rs`

Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`.

Split off from rust-lang#145024
…, r=davidtwco

Refactor attribute parsing to improve ergonomics and some diagnostics
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. rollup A PR which is a rollup labels Aug 21, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Aug 21, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 21, 2025

📌 Commit 7d2993d has been approved by jhpratt

It is now in the queue for this repository.

@bors bors 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 21, 2025
@bors
Copy link
Collaborator

bors commented Aug 21, 2025

⌛ Testing commit 7d2993d with merge 8e3710e...

@bors
Copy link
Collaborator

bors commented Aug 22, 2025

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing 8e3710e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 22, 2025
@bors bors merged commit 8e3710e into rust-lang:master Aug 22, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 22, 2025
Copy link
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 6ba0ce4 (parent) -> 8e3710e (this PR)

Test differences

Show 40 test diffs

Stage 1

  • [ui] tests/ui/c-variadic/same-program-multiple-abis-arm.rs: [missing] -> ignore (only executed when the ABI is eabihf ((the assembly below requires float hardware support))) (J1)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs: [missing] -> pass (J1)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis.rs: pass -> [missing] (J1)
  • [ui] tests/ui/coroutine/static-closure-unexpanded.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/internal/higher-ranked-query-instability.rs: [missing] -> pass (J1)

Stage 2

  • [codegen] tests/codegen-llvm/slice-last-elements-optimization.rs: ignore (only executed when the architecture is x86_64) -> pass (J0)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs: [missing] -> pass (J2)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis.rs: pass -> [missing] (J2)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs: [missing] -> ignore (only executed when the architecture is x86_64) (J3)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis.rs: ignore (only executed when the architecture is x86_64) -> [missing] (J3)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis-arm.rs: [missing] -> pass (J4)
  • [ui] tests/ui/coroutine/static-closure-unexpanded.rs: [missing] -> pass (J5)
  • [ui] tests/ui/lint/internal/higher-ranked-query-instability.rs: [missing] -> pass (J5)
  • [ui] tests/ui/c-variadic/same-program-multiple-abis-arm.rs: [missing] -> ignore (only executed when the ABI is eabihf ((the assembly below requires float hardware support))) (J6)

Additionally, 26 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 8e3710ef31a0b2cdf5a1c2f3929b7735d1e28c20 --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. dist-aarch64-apple: 5447.9s -> 7298.9s (34.0%)
  2. aarch64-gnu-debug: 4291.1s -> 5023.3s (17.1%)
  3. x86_64-gnu-miri: 4550.0s -> 5183.7s (13.9%)
  4. aarch64-gnu: 6933.3s -> 7896.1s (13.9%)
  5. i686-gnu-2: 5437.2s -> 6147.9s (13.1%)
  6. aarch64-gnu-llvm-19-2: 2144.5s -> 2403.2s (12.1%)
  7. x86_64-gnu-llvm-19: 2504.5s -> 2799.2s (11.8%)
  8. i686-gnu-nopt-1: 7471.2s -> 8349.3s (11.8%)
  9. x86_64-rust-for-linux: 2645.4s -> 2939.1s (11.1%)
  10. test-various: 4600.5s -> 5104.2s (10.9%)
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
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#137494 libstd: init(): dup() subsequent /dev/nulls instead of open… a6566cf4d27ddf61988144acacdc8c9c67486056 (link)
#144541 c-variadic: multiple ABIs in the same program for arm eda023ddeb6d4c2778b985bdcd8e7338597ece0f (link)
#144613 aarch64-nintendo-switch-freestanding - Enable CPU features … 1587237963a498296dca8d0fc39d8f518bd571f5 (link)
#144780 Add a method to dump MIR in the middle of MIR building 1b46b77cab3d8ffd62ee716b9e67cb38986d358d (link)
#145137 Consolidate panicking functions in slice/index.rs ad44811cf0a051be101486c1766109ff671bc0b6 (link)
#145507 Refactor attribute parsing to improve ergonomics and some d… f0e241d17604419dc27ffe0b33ffac2b6f92614f (link)
#145604 Gate static closures behind a parser feature 12aaddab53055e7d32b19e5dc1089306d461aa2f (link)
#145648 Add two tidy dependency checks 274928f521ba66a8e715cc816b4e01e177b80245 (link)
#145661 update some s390x codegen tests c5af59db94950a2fa86a1544ac14b22601353306 (link)
#145672 Instantiate higher-ranked binder with erased when checking … bd77335da0cd495eb897656871efef9938fce0fa (link)
#145689 Migrate panic_unwind to use cfg_select! 4aca0b81cf81bc6df5e187e162adc59f27bbbfee (link)
#145700 Handle ReEarlyParam in type_name. 51d3c9a00f0d8b2cbfa46527b8152d396c2a06c9 (link)
#145703 Remove MIPS targets from CI LLVM platforms f9e0f8f79aa146d1034d11f2b074343678e8045a (link)
#145704 ci: don't cleanup windows disk 9d4aac43dad92f943a4f7b7229e85a1b7d152b1f (link)
#145705 remove an as cast in prefetch codegen 0d67b18512a22949434a942bccde28374702a444 (link)
#145712 Update outdated link in bound region comments 9f35ec4a1ef9f949d0808db406cee10785363216 (link)

previous master: 6ba0ce4094

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
Collaborator

Finished benchmarking commit (8e3710e): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.8% [-1.2%, -0.4%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.8% [-1.2%, -0.4%] 5

Max RSS (memory usage)

Results (primary 2.1%, secondary 0.6%)

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

mean range count
Regressions ❌
(primary)
3.9% [2.4%, 7.2%] 5
Regressions ❌
(secondary)
2.8% [2.1%, 3.6%] 2
Improvements ✅
(primary)
-6.5% [-6.5%, -6.5%] 1
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) 2.1% [-6.5%, 7.2%] 6

Cycles

Results (secondary 0.2%)

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.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, 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.1% [0.0%, 0.3%] 12
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 2
Improvements ✅
(primary)
-0.1% [-0.4%, -0.0%] 27
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 37
All ❌✅ (primary) -0.1% [-0.4%, 0.3%] 39

Bootstrap: 471.281s -> 471.382s (0.02%)
Artifact size: 378.27 MiB -> 378.26 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) 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-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like perf-regression Performance regression. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.