Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Nov 6, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GuillaumeGomez and others added 28 commits October 28, 2025 15:44
… 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`
Offload device

LLVM's offload functionality usually expects an extra dyn_ptr argument. We could avoid it,b ut likely gonna need it very soon in one of the follow-up PRs (e.g. to request shared memory). So we might as well already add it.

This PR adds a %dyn_ptr ptr to GPUKernel ABI functions, if the offload feature is enabled.

WIP

r? `@ghost`
…r=joboet

add extend_front to VecDeque with specialization like extend

ACP: rust-lang/libs-team#658
Tracking issue: rust-lang#146975

_Text below was written before opening the ACP_

Feature was requested in rust-lang#69939, I recently also needed it so decided to implement it as my first contribution to the Rust standard library. I plan on doing more but wanted to start with a small change.

Some questions I had (both on implementation and design) with answers:
- Q: `extend` allows iterators that yield `&T` where `T` is `Clone`, should extend_front do too?
  A: No, users can use [`copied`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.copied) and/or [`cloned`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.cloned).
- Q: Does this need a whole new trait like Extend or only a method on `VecDeque`?
  A: No, see ACP.
- Q: How do I deal with all the code duplication? Most code is similar to that of `extend`, maybe there is a nice way to factor out the code around `push_unchecked`/`push_front_unchecked`.
  Will come back to this later.
- Q: Why are certain things behind feature gates, `cfg(not(test))` like `vec::IntoIter` here and `cfg(not(no_global_oom_handling))` like `Vec::extend_from_within`? (I am also looking at implementing `VecDeque::extend_from_within`)
  A: See rust-lang#146861 (review)
- Q: Should `extend_front` act like repeated pushes to the front of the queue? This reverses the order of the elements. Doing it different might incur an extra move if the iterator length is not known up front (where do you start placing elements in the buffer?).
  A: `extend_front` acts like repeated pushes, `prepend` preserves the element order, see ACP or tracking issue.
…on, r=yotamofek

Fix invalid tag closing when leaving expansion "original code"

Fixes rust-lang#148184.

Problem was that in case an element inside the expansion's "original" element was not closed, this element would get its `pending_exit` field set to `true`, removing it when the next non-mergeable item gets pushed instead of being put inside it, and then next `exit_elem` would try to exit an empty class queue.

r? `@notriddle`
…te, r=lcnr

Un-shadow object bound candidate in `NormalizesTo` goal if self_ty is trait object

Fixes rust-lang/trait-system-refactor-initiative#244

r? lcnr
run-make tests: use edition 2024

Bump run-make tests to edition 2024 to prevent test failures when using 2024 idioms in included code, such as I ran into here: rust-lang#147808.
…eyouxu

Add regression test for issue 148542

Closes rust-lang#148542
…-closure, r=JonathanBrouwer

Fix suggestion for returning async closures

Fixes rust-lang#148493
Fix ICE from async closure variance

Fixes rust-lang#148488

The fix is also a change from rust-lang#148556
…illaumeGomez

rustdoc-search: remove broken index special case

Fixes rust-lang#148431
@rustbot rustbot added 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 labels Nov 6, 2025
@rustbot rustbot added A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Nov 6, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 6, 2025
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/async-closures/ice-async-closure-variance-issue-148488/ice-async-closure-variance-issue-148488.stderr`
diff of stderr:

11    |
12 LL | fn ord<a>() -> _ {
13    |                ^ not allowed in type signatures
+    |
+ help: replace with an appropriate return type
+    |
+ LL - fn ord<a>() -> _ {
+ LL + fn ord<a>() -> impl AsyncFn() {
+    |
14 
15 error[E0392]: lifetime parameter `'g` is never used
16   --> $DIR/ice-async-closure-variance-issue-148488.rs:3:10


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args async-await/async-closures/ice-async-closure-variance-issue-148488.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/async-closures/ice-async-closure-variance-issue-148488.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/async-closures/ice-async-closure-variance-issue-148488" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024"
stdout: none
--- stderr -------------------------------
warning: type parameter `a` should have an upper camel case name
##[warning]  --> /checkout/tests/ui/async-await/async-closures/ice-async-closure-variance-issue-148488.rs:6:8
   |
LL | fn ord<a>() -> _ {
   |        ^ help: convert the identifier to upper camel case: `A`
   |
   = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
##[error]  --> /checkout/tests/ui/async-await/async-closures/ice-async-closure-variance-issue-148488.rs:6:16
   |
LL | fn ord<a>() -> _ {
   |                ^ not allowed in type signatures
   |
help: replace with an appropriate return type
   |
LL - fn ord<a>() -> _ {
LL + fn ord<a>() -> impl AsyncFn() {
   |

error[E0392]: lifetime parameter `'g` is never used
##[error]  --> /checkout/tests/ui/async-await/async-closures/ice-async-closure-variance-issue-148488.rs:3:10
   |
LL | struct T<'g>();
   |          ^^ unused lifetime parameter
   |
   = help: consider removing `'g`, referring to it in a field, or using a marker such as `PhantomData`

error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0121, E0392.
For more information about an error, try `rustc --explain E0121`.

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. A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-search Area: Rustdoc's search feature rollup A PR which is a rollup 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.