Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Nov 8, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fmease and others added 27 commits October 29, 2025 02:49
A spanish translation was added in
rust-lang/rust-by-example#1910, but the upstream
integration was never added.
…ay' in '[_]' and '*mut [_]'; Update feature gate and tracking issue for 'alloc_slice_into_array' items;
… r=Amanieu

Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro

closes rust-lang#145649
closes rust-lang#135413
cc: rust-lang#130869
reference PR: rust-lang/reference#1972

# Stabilization report

## Summary

This PR stabilizes the following s390x target features:

- `vector`
- `vector-enhancements-1`
- `vector-enhancements-2`
- `vector-enhancements-3`
- `vector-packed-decimal`
- `vector-packed-decimal-enhancement`
- `vector-packed-decimal-enhancement-2`
- `vector-packed-decimal-enhancement-3`
- `nnp-assist`
- `miscellaneous-extensions-2`
- `miscellaneous-extensions-3`
- `miscellaneous-extensions-4`

Additionally, it stabilizes the `std::arch::is_s390x_feature_detected!` macro itself and stably accepts the target features listed above.

## Tests & ABI details

Only the `vector` target feature changes the ABI, much like e.g. `avx2` it will, depending on the ABI, pass vector types in vector registers. This behavior is tested extensively:

- [tests/assembly-llvm/s390x-vector-abi.rs](https://github.com/rust-lang/rust/blob/22a86f8280becb12c34ee3efd952baf5cf086fa0/tests/assembly-llvm/s390x-vector-abi.rs)
- [tests/codegen-llvm/s390x-simd.rs](https://github.com/rust-lang/rust/blob/22a86f8280becb12c34ee3efd952baf5cf086fa0/tests/assembly-llvm/s390x-vector-abi.rs)
- [tests/ui/abi/simd-abi-checks-s390x.rs ](https://github.com/rust-lang/rust/blob/22a86f8280becb12c34ee3efd952baf5cf086fa0/tests/ui/abi/simd-abi-checks-s390x.rs )

The remaining features don't influence the ABI, they only influence instruction selection. In stdarch we test that the expected instructions are in fact generated when the target feature is enabled.

## Implementation history

For `is_s390x_feature_detected!`:

- rust-lang/stdarch#1699
- rust-lang#138275
- rust-lang/stdarch#1720
- rust-lang/stdarch#1832

For `vector` and friends

- rust-lang#127506
- rust-lang#135630
- rust-lang#141250

## Unresolved questions

There is a fixme in [tests/ui/abi/simd-abi-checks-s390x.rs](https://github.com/rust-lang/rust/blob/22a86f8280becb12c34ee3efd952baf5cf086fa0/tests/ui/abi/simd-abi-checks-s390x.rs):

```
// FIXME: +soft-float itself doesn't set -vector
//`@[z13_soft_float]` compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13 -C target-feature=-vector,+soft-float
//`@[z13_soft_float]` needs-llvm-components: systemz
```

I'm not sure whether that blocks stabilization?

---

The implementation first extracts the listed target features into their own `s390x_target_feature_vector` rust feature, and then stabilizes that. best reviewed commit-by-commit

r? `@Amanieu`
cc `@uweigand`  `@taiki-e`
…nfo, r=Mark-Simulacrum

std_detect: Support run-time detection on OpenBSD using elf_aux_info
…Jung

Implement SIMD funnel shifts in const-eval/Miri

Split off from rust-lang#147520 with just this change for easier review

r? ```@RalfJung```
Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.

Tracking issue: rust-lang#133508

Closes: rust-lang#133508

This PR stabilises the `as_array` and `as_mut_array` associated functions from the `core_slice_as_array` feature gate:

```rust
// core::slice

impl<T> [T] {
    pub const fn as_array<const N: usize>(&self) -> Option<&[T; N]>;

    pub const fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]>;
}

// core::ptr

impl<T> *const [T] {
    pub const fn as_array<const N: usize>(self) -> Option<*const [T; N]>;
}

impl<T> *mut [T] {
    pub const fn as_mut_array<const N: usize>(self) -> Option<*mut [T; N]>;
}
```

It also updates the feature gates and tracking issues for all items associated with the previous `slice_as_array` tracking issue (including these four that are being stabilised).

~~FCP missing.~~
update isolate_highest_one for NonZero<T>

## Rationale
Let `x = self` and
`m = (((1 as $Int) << (<$Int>::BITS - 1)).wrapping_shr(self.leading_zeros()))`
Then the previous code computed `NonZero::new_unchecked(x & m)`.
Since `m` has exactly one bit set (the most significant 1-bit of `x`), `(x & m) == m`.
Therefore, the masking step was redundant.

The shift is safe and does not need wrapping because:
* `self.leading_zeros() < $Int::BITS` because `self` is non-zero.
* The result of `unchecked_shr` is non-zero, satisfying the `NonZero` invariant. if wrapping happens we would be violating `NonZero` invariants.

why this micro optimization?
the old code was suboptimal it duplicated `$Int`’s isolate_highest_one logic instead of delegating to it. Since the type already wraps `$Int`, either delegation should be used for clarity or, if keeping a custom implementation, it should be optimized as above.
…=GuillaumeGomez

rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks

Before | After
---|---
<img width="517" height="532" alt="Screenshot 2025-10-28 at 23-21-02 pre rs - source" src="https://github.com/user-attachments/assets/5026761f-c604-4bcc-a699-9e75eb73dff6" /> | <img width="499" height="531" alt="Screenshot 2025-10-28 at 23-21-51 pre rs - source" src="https://github.com/user-attachments/assets/cc8c65e7-e3ad-4e20-a2c3-2623cf799093" />
Fix rust-by-example spanish translation

A spanish translation was added in rust-lang/rust-by-example#1910, but the upstream integration was never added.

```@marioidival,``` I assume you intended for this to go live?
…-closure, r=JonathanBrouwer

Fix suggestion for returning async closures

Fixes rust-lang#148493
…, r=yotamofek

[rustdoc] Replace `print` methods with functions to improve code readability

We have a lot of `print` methods, making it quite tricky to know what the types we're manipulating are.

We did something similar with `Clean` trait a few years ago (the first PR was rust-lang#99638, followed by a lot of them).

Each commit replaces one type for easier review.

r? `````@yotamofek`````
…ttrs, r=JonathanBrouwer

re-use `self.get_all_attrs` result for pass indirectly attribute

Could be a fix for a potential performance regression reported here rust-lang#144529 (comment). Apparently the regression later disappeared. Nevertheless, this seems like a decent refactor.

r? ````@JonathanBrouwer```` (vaguely attribute-related, maybe there are other optimizations to that PR that we're missing)
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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) labels Nov 8, 2025
bors added a commit that referenced this pull request Nov 8, 2025
Rollup of 10 pull requests

Successful merges:

 - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro)
 - #147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info)
 - #147534 (Implement SIMD funnel shifts in const-eval/Miri)
 - #147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.)
 - #147686 (update isolate_highest_one for NonZero<T>)
 - #148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks)
 - #148555 (Fix rust-by-example spanish translation)
 - #148556 (Fix suggestion for returning async closures)
 - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability)
 - #148600 (re-use `self.get_all_attrs` result for pass indirectly attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

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

@bors
Copy link
Collaborator

bors commented Nov 8, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 8, 2025
@matthiaskrgr
Copy link
Member Author

@bors retry network error

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

bors commented Nov 8, 2025

⌛ Testing commit bbd3ab8 with merge 328779c...

bors added a commit that referenced this pull request Nov 8, 2025
Rollup of 10 pull requests

Successful merges:

 - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro)
 - #147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info)
 - #147534 (Implement SIMD funnel shifts in const-eval/Miri)
 - #147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.)
 - #147686 (update isolate_highest_one for NonZero<T>)
 - #148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks)
 - #148555 (Fix rust-by-example spanish translation)
 - #148556 (Fix suggestion for returning async closures)
 - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability)
 - #148600 (re-use `self.get_all_attrs` result for pass indirectly attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain enhanced) (plain)

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

@bors
Copy link
Collaborator

bors commented Nov 8, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 8, 2025
@matthiaskrgr
Copy link
Member Author

@bors retry

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

bors commented Nov 9, 2025

⌛ Testing commit bbd3ab8 with merge acda5e9...

@bors
Copy link
Collaborator

bors commented Nov 9, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing acda5e9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 9, 2025
@bors bors merged commit acda5e9 into rust-lang:master Nov 9, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

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 72b21e1 (parent) -> acda5e9 (this PR)

Test differences

Show 2021 test diffs

Stage 1

  • [rustdoc] tests/rustdoc/jump-to-def/shebang.rs: [missing] -> pass (J0)
  • [rustdoc] tests/rustdoc/source-code-pages/frontmatter.rs: [missing] -> pass (J0)
  • [rustdoc] tests/rustdoc/source-code-pages/shebang.rs: [missing] -> pass (J0)
  • [ui] tests/ui/async-await/async-closures/suggest-impl-async-fn-issue-148493.rs: [missing] -> pass (J0)

Stage 2

  • [rustdoc] tests/rustdoc/jump-to-def/shebang.rs: [missing] -> pass (J1)
  • [rustdoc] tests/rustdoc/source-code-pages/frontmatter.rs: [missing] -> pass (J1)
  • [rustdoc] tests/rustdoc/source-code-pages/shebang.rs: [missing] -> pass (J1)
  • [ui] tests/ui/async-await/async-closures/suggest-impl-async-fn-issue-148493.rs: [missing] -> pass (J2)

Additionally, 2013 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 acda5e9f9aadac705b851935b14aa3d34a67d428 --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: 6351.1s -> 12431.4s (+95.7%)
  2. dist-x86_64-apple: 6854.0s -> 8806.5s (+28.5%)
  3. x86_64-gnu-llvm-20-3: 6227.4s -> 6929.7s (+11.3%)
  4. aarch64-gnu-debug: 4164.0s -> 4627.9s (+11.1%)
  5. aarch64-apple: 9388.6s -> 8346.7s (-11.1%)
  6. x86_64-gnu-llvm-21-1: 3724.0s -> 3335.5s (-10.4%)
  7. x86_64-gnu-stable: 7661.6s -> 6955.4s (-9.2%)
  8. dist-armhf-linux: 5180.0s -> 4717.4s (-8.9%)
  9. dist-apple-various: 3628.0s -> 3934.8s (+8.5%)
  10. x86_64-msvc-ext3: 6799.5s -> 6260.1s (-7.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
#145656 Stabilize s390x vector target feature and `is_s390x_featu… fe2781096aabc075269876b79ca800eaab9c951b (link)
#147024 std_detect: Support run-time detection on OpenBSD using elf… 85332f2456f98d28c09fb406767d8edae1c710c4 (link)
#147534 Implement SIMD funnel shifts in const-eval/Miri 7b97b3107a799b9ea923202363516cf12dbbf124 (link)
#147540 Stabilise as_array in [_] and *const [_]; stabilise `… 09297c53fec205c43271df96ddeda4b6b48cca50 (link)
#147686 update isolate_highest_one for NonZero 7eca5e2fa02378de9508b3be0771d6d2c7a5d0b1 (link)
#148230 rustdoc: Properly highlight shebang, frontmatter & weak key… 7afa83bacc232ee32239495d39d38fdb8b287a93 (link)
#148555 Fix rust-by-example spanish translation 8a419ae37164b5ede97b0756e8afa7c42cdd6742 (link)
#148556 Fix suggestion for returning async closures d072cdf0180d9500ed6d84fbd6b6bdcd9aa1de78 (link)
#148585 [rustdoc] Replace print methods with functions to improve… b4dae7b8b389dd086378f8fcf9396046d64f8762 (link)
#148600 re-use self.get_all_attrs result for pass indirectly attr… c77a8eaa446324e9824dba33107bc6d07dc549c0 (link)

previous master: 72b21e1a64

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 (acda5e9): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

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

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary 2.4%)

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 476.758s -> 474.157s (-0.55%)
Artifact size: 390.96 MiB -> 390.96 MiB (0.00%)

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. 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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.