-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Stabilize s390x vector target feature and is_s390x_feature_detected! macro
#145656
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
Conversation
|
cc @Amanieu, @folkertdev, @sayantn |
|
@rfcbot merge |
|
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
I think this is fine since we don't have a soft-float s390x target and don't expose the |
|
|
|
On s390x, in LLVM (and GCC), the In LLVM in particular, the back-end does actually implement that In practice, the only user of |
|
We've revised and approved the Reference PR, so this will be good to go on that front when FCP completes. (cc @rust-lang/lang-docs) On the lang side, this looks good to me. @rfcbot reviewed |
|
The linux kernel needs a separate target that has soft-float set. We cannot support such ABI-changing target features with |
|
☔ The latest upstream changes (presumably #145728) made this pull request unmergeable. Please resolve the merge conflicts. |
|
As for the soft-float target feature, I don't think we need to worry about it here. It is not supported on rustc's target feature interface (rustc emits a "unknown and unstable feature" warning that says "use of this feature might be unsound" when it is used), and as discussed in the vector ABI PR (#131586 (comment)), it will eventually be rejected for setting via -Ctarget-feature. For the Linux kernel, a bare-metal soft-float (custom or new builtin) target should be used. |
|
@rfcbot reviewed |
|
@bors retry |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Rollup of 7 pull requests Successful merges: - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - #148204 (Modify contributor email entries in .mailmap) - #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) - #148612 (Add note for identifier with attempted hygiene violation) - #148613 (Switch hexagon targets to rust-lld) r? `@ghost` `@rustbot` modify labels: rollup
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
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
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
Rollup merge of #145656 - folkertdev:stabilize-s390x-vector, r=Amanieu Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro closes #145649 closes #135413 cc: #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 - #138275 - rust-lang/stdarch#1720 - rust-lang/stdarch#1832 For `vector` and friends - #127506 - #135630 - #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`
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - rust-lang/rust#147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info) - rust-lang/rust#147534 (Implement SIMD funnel shifts in const-eval/Miri) - rust-lang/rust#147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.) - rust-lang/rust#147686 (update isolate_highest_one for NonZero<T>) - rust-lang/rust#148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - rust-lang/rust#148555 (Fix rust-by-example spanish translation) - rust-lang/rust#148556 (Fix suggestion for returning async closures) - rust-lang/rust#148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - rust-lang/rust#148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - rust-lang/rust#147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info) - rust-lang/rust#147534 (Implement SIMD funnel shifts in const-eval/Miri) - rust-lang/rust#147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.) - rust-lang/rust#147686 (update isolate_highest_one for NonZero<T>) - rust-lang/rust#148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - rust-lang/rust#148555 (Fix rust-by-example spanish translation) - rust-lang/rust#148556 (Fix suggestion for returning async closures) - rust-lang/rust#148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - rust-lang/rust#148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - rust-lang/rust#147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info) - rust-lang/rust#147534 (Implement SIMD funnel shifts in const-eval/Miri) - rust-lang/rust#147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.) - rust-lang/rust#147686 (update isolate_highest_one for NonZero<T>) - rust-lang/rust#148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - rust-lang/rust#148555 (Fix rust-by-example spanish translation) - rust-lang/rust#148556 (Fix suggestion for returning async closures) - rust-lang/rust#148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - rust-lang/rust#148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) r? `@ghost` `@rustbot` modify labels: rollup
|
Hi @folkertdev, thanks for pushing this! Unfortunately, since this PR was merged, our CI runs are now failing with: It seems to me the test now assumes |
|
Ah, the test file needs to enable the diff --git a/library/std/tests/run-time-detect.rs b/library/std/tests/run-time-detect.rs
index b2c3d0d3f9f..be2980f7326 100644
--- a/library/std/tests/run-time-detect.rs
+++ b/library/std/tests/run-time-detect.rs
@@ -16,6 +16,7 @@
all(target_arch = "powerpc64", target_os = "linux"),
feature(stdarch_powerpc_feature_detection)
)]
+#![cfg_attr(all(target_arch = "s390x", target_os = "linux"), feature(s390x_target_feature))]
#[test]
#[cfg(all(target_arch = "arm", any(target_os = "linux", target_os = "android")))] |
I've started a run to verify. Thanks! |
…ture, r=tgross35 add missing s390x target feature to std detect test Fix an oversight from rust-lang#145656, where the `is_s390x_feature_detected!` macro and some target features were stabilized, but other target features remain unstable under a new target feature name. I tested this locally using a `stage1` build on the test file with the `s390x-unknown-linux-gnu` target. cc `@uweigand` r? `@Amanieu` (or whoever really)
…ture, r=tgross35 add missing s390x target feature to std detect test Fix an oversight from rust-lang#145656, where the `is_s390x_feature_detected!` macro and some target features were stabilized, but other target features remain unstable under a new target feature name. I tested this locally using a `stage1` build on the test file with the `s390x-unknown-linux-gnu` target. cc ``@uweigand`` r? ``@Amanieu`` (or whoever really)
…ture, r=tgross35 add missing s390x target feature to std detect test Fix an oversight from rust-lang#145656, where the `is_s390x_feature_detected!` macro and some target features were stabilized, but other target features remain unstable under a new target feature name. I tested this locally using a `stage1` build on the test file with the `s390x-unknown-linux-gnu` target. cc ```@uweigand``` r? ```@Amanieu``` (or whoever really)
Rollup merge of #148902 - folkertdev:detect-s390x-target-feature, r=tgross35 add missing s390x target feature to std detect test Fix an oversight from #145656, where the `is_s390x_feature_detected!` macro and some target features were stabilized, but other target features remain unstable under a new target feature name. I tested this locally using a `stage1` build on the test file with the `s390x-unknown-linux-gnu` target. cc ```@uweigand``` r? ```@Amanieu``` (or whoever really)
… 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`
…ture, r=tgross35 add missing s390x target feature to std detect test Fix an oversight from rust-lang#145656, where the `is_s390x_feature_detected!` macro and some target features were stabilized, but other target features remain unstable under a new target feature name. I tested this locally using a `stage1` build on the test file with the `s390x-unknown-linux-gnu` target. cc ```@uweigand``` r? ```@Amanieu``` (or whoever really)
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - rust-lang/rust#147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info) - rust-lang/rust#147534 (Implement SIMD funnel shifts in const-eval/Miri) - rust-lang/rust#147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.) - rust-lang/rust#147686 (update isolate_highest_one for NonZero<T>) - rust-lang/rust#148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - rust-lang/rust#148555 (Fix rust-by-example spanish translation) - rust-lang/rust#148556 (Fix suggestion for returning async closures) - rust-lang/rust#148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - rust-lang/rust#148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) r? `@ghost` `@rustbot` modify labels: rollup
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [rust](https://github.com/rust-lang/rust) | minor | `1.92.0` → `1.93.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>rust-lang/rust (rust)</summary> ### [`v1.93.0`](https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1930-2026-01-22) [Compare Source](rust-lang/rust@1.92.0...1.93.0) \========================== <a id="1.93.0-Language"></a> ## Language - [Stabilize several s390x `vector`-related target features and the `is_s390x_feature_detected!` macro](rust-lang/rust#145656) - [Stabilize declaration of C-style variadic functions for the `system` ABI](rust-lang/rust#145954) - [Emit error when using some keyword as a `cfg` predicate](rust-lang/rust#146978) - [Stabilize `asm_cfg`](rust-lang/rust#147736) - [During const-evaluation, support copying pointers byte-by-byte](rust-lang/rust#148259) - [LUB coercions now correctly handle function item types, and functions with differing safeties](rust-lang/rust#148602) - [Allow `const` items that contain mutable references to `static` (which is *very* unsafe, but not *always* UB)](rust-lang/rust#148746) - [Add warn-by-default `const_item_interior_mutations` lint to warn against calls which mutate interior mutable `const` items](rust-lang/rust#148407) - [Add warn-by-default `function_casts_as_integer` lint](rust-lang/rust#141470) <a id="1.93.0-Compiler"></a> ## Compiler - [Stabilize `-Cjump-tables=bool`](rust-lang/rust#145974). The flag was previously called `-Zno-jump-tables`. <a id="1.93.0-Platform-Support"></a> ## Platform Support - [Promote `riscv64a23-unknown-linux-gnu` to Tier 2 (without host tools)](rust-lang/rust#148435) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html <a id="1.93.0-Libraries"></a> ## Libraries - [Stop internally using `specialization` on the `Copy` trait as it is unsound in the presence of lifetime dependent `Copy` implementations. This may result in some performance regressions as some standard library APIs may now call `Clone::clone` instead of performing bitwise copies](rust-lang/rust#135634) - [Allow the global allocator to use thread-local storage and `std::thread::current()`](rust-lang/rust#144465) - [Make `BTree::append` not update existing keys when appending an entry which already exists](rust-lang/rust#145628) - [Don't require `T: RefUnwindSafe` for `vec::IntoIter<T>: UnwindSafe`](rust-lang/rust#145665) <a id="1.93.0-Stabilized-APIs"></a> ## Stabilized APIs - [`<[MaybeUninit<T>]>::assume_init_drop`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_drop) - [`<[MaybeUninit<T>]>::assume_init_ref`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_ref) - [`<[MaybeUninit<T>]>::assume_init_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_mut) - [`<[MaybeUninit<T>]>::write_copy_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_copy_of_slice) - [`<[MaybeUninit<T>]>::write_clone_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_clone_of_slice) - [`String::into_raw_parts`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_raw_parts) - [`Vec::into_raw_parts`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts) - [`<iN>::unchecked_neg`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_neg) - [`<iN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shl) - [`<iN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shr) - [`<uN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shl) - [`<uN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shr) - [`<[T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_array) - [`<[T]>::as_array_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_array) - [`<*const [T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_array) - [`<*mut [T]>::as_array_mut`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_mut_array) - [`VecDeque::pop_front_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_front_if) - [`VecDeque::pop_back_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_back_if) - [`Duration::from_nanos_u128`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_nanos_u128) - [`char::MAX_LEN_UTF8`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF8) - [`char::MAX_LEN_UTF16`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF16) - [`std::fmt::from_fn`](https://doc.rust-lang.org/stable/std/fmt/fn.from_fn.html) - [`std::fmt::FromFn`](https://doc.rust-lang.org/stable/std/fmt/struct.FromFn.html) <a id="1.93.0-Cargo"></a> ## Cargo - [Enable CARGO\_CFG\_DEBUG\_ASSERTIONS in build scripts based on profile](rust-lang/cargo#16160) - [In `cargo tree`, support long forms for `--format` variables](rust-lang/cargo#16204) - [Add `--workspace` to `cargo clean`](rust-lang/cargo#16263) <a id="1.93.0-Rustdoc"></a> ## Rustdoc - [Remove `#![doc(document_private_items)]`](rust-lang/rust#146495) - [Include attribute and derive macros in search filters for "macros"](rust-lang/rust#148176) - [Include extern crates in search filters for `import`](rust-lang/rust#148301) - [Validate usage of crate-level doc attributes](rust-lang/rust#149197). This means if any of `html_favicon_url`, `html_logo_url`, `html_playground_url`, `issue_tracker_base_url`, or `html_no_source` either has a missing value, an unexpected value, or a value of the wrong type, rustdoc will emit the deny-by-default lint `rustdoc::invalid_doc_attributes`. <a id="1.93.0-Compatibility-Notes"></a> ## Compatibility Notes - [Introduce `pin_v2` into the builtin attributes namespace](rust-lang/rust#139751) - [Update bundled musl to 1.2.5](rust-lang/rust#142682) - [On Emscripten, the unwinding ABI used when compiling with `panic=unwind` was changed from the JS exception handling ABI to the wasm exception handling ABI.](rust-lang/rust#147224) If linking C/C++ object files with Rust objects, `-fwasm-exceptions` must be passed to the linker now. On nightly Rust, it is possible to get the old behavior with `-Zwasm-emscripten-eh=false -Zbuild-std`, but it will be removed in a future release. - The `#[test]` attribute, used to define tests, was previously ignored in various places where it had no meaning (e.g on trait methods or types). Putting the `#[test]` attribute in these places is no longer ignored, and will now result in an error; this may also result in errors when generating rustdoc. [Error when `test` attribute is applied to structs](rust-lang/rust#147841) - Cargo now sets the `CARGO_CFG_DEBUG_ASSERTIONS` environment variable in more situations. This will cause crates depending on `static-init` versions 1.0.1 to 1.0.3 to fail compilation with "failed to resolve: use of unresolved module or unlinked crate `parking_lot`". See [the linked issue](rust-lang/rust#150646 (comment)) for details. - [User written types in the `offset_of!` macro are now checked to be well formed.](rust-lang/rust#150465) - `cargo publish` no longer emits `.crate` files as a final artifact for user access when the `build.build-dir` config is unset - [Upgrade the `deref_nullptr` lint from warn-by-default to deny-by-default](rust-lang/rust#148122) - [Add future-incompatibility warning for `...` function parameters without a pattern outside of `extern` blocks](rust-lang/rust#143619) - [Introduce future-compatibility warning for `repr(C)` enums whose discriminant values do not fit into a `c_int` or `c_uint`](rust-lang/rust#147017) - [Introduce future-compatibility warning against ignoring `repr(C)` types as part of `repr(transparent)`](rust-lang/rust#147185) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44OC4yIiwidXBkYXRlZEluVmVyIjoiNDIuODguMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
Pkgsrc changes: * Update version & checksums. * Adapt openssl-src patches to minor version update. Noteable failures at the time of commit: * The cross-build for sparc64 fails, not yet reported. Upstream changes relative to 1.92.0: Version 1.93 (2026-01-22) ========================== Language -------- - [Add warn-by-default `function_casts_as_integer` lint] (rust-lang/rust#141470) - [Add future-incompatibility warning for `...` function parameters without a pattern outside of `extern` blocks] (rust-lang/rust#143619) - [Stabilize several s390x `vector`-related target features and the `is_s390x_feature_detected!` macro] (rust-lang/rust#145656) - [Stabilize declaration of C-style variadic functions for the `system` ABI] (rust-lang/rust#145954) - [Emit error when using some keyword as a `cfg` predicate] (rust-lang/rust#146978) - [Introduce future-compatibility warning for `repr(C)` enums whose discriminant values do not fit into a `c_int` or `c_uint`] (rust-lang/rust#147017) - [Introduce future-compatibility warning against ignoring `repr(C)` types as part of `repr(transparent)`] (rust-lang/rust#147185) - [Stabilize `asm_cfg`] (rust-lang/rust#147736) - [Upgrade the `deref_nullptr` lint from warn-by-default to deny-by-default] (rust-lang/rust#148122) - [During const-evaluation, support copying pointers byte-by-byte] (rust-lang/rust#148259) - [Add warn-by-default `const_item_interior_mutations` lint to warn against calls which mutate interior mutable `const` items] (rust-lang/rust#148407) - [LUB coercions now correctly handle function item types, and functions with differing safeties] (rust-lang/rust#148602) - [Allow `const` items that contain mutable references to `static` (which is *very* unsafe, but not *always* UB)] (rust-lang/rust#148746) Compiler -------- - [Stabilize `-Cjump-tables=bool`] (rust-lang/rust#145974). The flag was previously called `-Zno-jump-tables`. - [Promote `riscv64a23-unknown-linux-gnu` to Tier 2 (without host tools)] (rust-lang/rust#148435) Platform Support ---------------- Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html Libraries --------- - [Stop internally using `specialization` on the `Copy` trait as it is unsound in the presence of lifetime dependent `Copy` implementations. This may result in some performance regressions as some standard library APIs may now call `Clone::clone` instead of performing bitwise copies] (rust-lang/rust#135634) - [Allow the global allocator to use thread-local storage and `std::thread::current()`] (rust-lang/rust#144465) - [Make `BTree::append` not update existing keys when appending an entry which already exists] (rust-lang/rust#145628) - [Don't require `T: RefUnwindSafe` for `vec::IntoIter<T>: UnwindSafe`] (rust-lang/rust#145665) Stabilized APIs --------------- - [`<MaybeUninit<T>>::assume_init_drop`] (https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.assume_init_drop) - [`<MaybeUninit<T>>::assume_init_ref`] (https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.assume_init_ref) - [`<MaybeUninit<T>>::assume_init_mut`] (https://doc.rust-lang.org/stable/core/mem/union.MaybeUninit.html#method.assume_init_mut) - [`<[MaybeUninit<T>]>::write_copy_of_slice`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_copy_of_slice) - [`<[MaybeUninit<T>]>::write_clone_of_slice`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_clone_of_slice) - [`String::into_raw_parts`] (https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_raw_parts) - [`Vec::into_raw_parts`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts) - [`<iN>::unchecked_neg`] (https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_neg) - [`<iN>::unchecked_shl`] (https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shl) - [`<iN>::unchecked_shr`] (https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shr) - [`<uN>::unchecked_shl`] (https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shl) - [`<uN>::unchecked_shr`] (https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shr) - [`<[T]>::as_array`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_array) - [`<[T]>::as_array_mut`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_array) - [`<*const [T]>::as_array`] (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_array) - [`<*mut [T]>::as_array_mut`] (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_mut_array) - [`VecDeque::pop_front_if`] (https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_front_if) - [`VecDeque::pop_back_if`] (https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_back_if) - [`Duration::from_nanos_u128`] (https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_nanos_u128) - [`char::MAX_LEN_UTF8`] (https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF8) - [`char::MAX_LEN_UTF16`] (https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF16) - [`std::fmt::from_fn`] (https://doc.rust-lang.org/stable/std/fmt/fn.from_fn.html) - [`std::fmt::FromFn`] (https://doc.rust-lang.org/stable/std/fmt/struct.FromFn.html) Cargo ----- - [Enable CARGO_CFG_DEBUG_ASSERTIONS in build scripts based on profile] (rust-lang/cargo#16160) - [In `cargo tree`, support long forms for `--format` variables] (rust-lang/cargo#16204) - [Add `--workspace` to `cargo clean`] (rust-lang/cargo#16263) Rustdoc ----- - [Remove `#![doc(document_private_items)]`](rust-lang/rust#146495) - [Include attribute and derive macros in search filters for "macros"](rust-lang/rust#148176) - [Include extern crates in search filters for `import`](rust-lang/rust#148301) - [Validate usage of crate-level doc attributes](rust-lang/rust#149197). This means if any of `html_favicon_url`, `html_logo_url`, `html_playground_url`, `issue_tracker_base_url`, or `html_no_source` either has a missing value, an unexpected value, or a value of the wrong type, rustdoc will emit the deny-by-default lint `rustdoc::invalid_doc_attributes`. Compatibility Notes ------------------- - [Introduce `pin_v2` into the builtin attributes namespace] (rust-lang/rust#139751) - [Update bundled musl to 1.2.5] (rust-lang/rust#142682) - [On Emscripten, the unwinding ABI used when compiling with `panic=unwind` was changed from the JS exception handling ABI to the wasm exception handling ABI.] (rust-lang/rust#147224) If linking C/C++ object files with Rust objects, `-fwasm-exceptions` must be passed to the linker now. On nightly Rust, it is possible to get the old behavior with `-Zwasm-emscripten-eh=false -Zbuild-std`, but it will be removed in a future release. - The `#[test]` attribute, used to define tests, was previously ignored in various places where it had no meaning (e.g on trait methods or types). Putting the `#[test]` attribute in these places is no longer ignored, and will now result in an error; this may also result in errors when generating rustdoc. [Error when `test` attribute is applied to structs] (rust-lang/rust#147841) - Cargo now sets the `CARGO_CFG_DEBUG_ASSERTIONS` environment variable in more situations. This will cause crates depending on `static-init` versions 1.0.1 to 1.0.3 to fail compilation with "failed to resolve: use of unresolved module or unlinked crate `parking_lot`". See [the linked issue] (rust-lang/rust#150646 (comment)) for details. - [User written types in the `offset_of!` macro are now checked to be well formed.] (rust-lang/rust#150465) - `cargo publish` no longer emits `.crate` files as a final artifact for user access when the `build.build-dir` config is unset
closes #145649
closes #135413
cc: #130869
reference PR: rust-lang/reference#1972
Stabilization report
Summary
This PR stabilizes the following s390x target features:
vectorvector-enhancements-1vector-enhancements-2vector-enhancements-3vector-packed-decimalvector-packed-decimal-enhancementvector-packed-decimal-enhancement-2vector-packed-decimal-enhancement-3nnp-assistmiscellaneous-extensions-2miscellaneous-extensions-3miscellaneous-extensions-4Additionally, it stabilizes the
std::arch::is_s390x_feature_detected!macro itself and stably accepts the target features listed above.Tests & ABI details
Only the
vectortarget feature changes the ABI, much like e.g.avx2it will, depending on the ABI, pass vector types in vector registers. This behavior is tested extensively: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!:is_s390x_feature_detectedstdarch#1699is_s390x_feature_detected!fromstd::arch#138275s390x_is_feature_detected!: detect more features stdarch#1720For
vectorand friendss390xtarget features #135630Unresolved questions
There is a fixme in tests/ui/abi/simd-abi-checks-s390x.rs:
I'm not sure whether that blocks stabilization?
The implementation first extracts the listed target features into their own
s390x_target_feature_vectorrust feature, and then stabilizes that. best reviewed commit-by-commitr? @Amanieu
cc @uweigand @taiki-e