Skip to content

Rollup of 5 pull requests#157073

Closed
JonathanBrouwer wants to merge 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-vnW3WRU
Closed

Rollup of 5 pull requests#157073
JonathanBrouwer wants to merge 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-vnW3WRU

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Paladynee and others added 10 commits May 16, 2026 10:31
Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle.

While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder.
Add bootstrap step for stdarch-verify

This PR hooks `library/stdarch/crates/stdarch-verify` crate into the bootstrap test runner as a step, so that we can run the stdarch-verify suite via x.py test.

Changes :
-> Added StdarchVerify in `src/bootstrap/src/core/build_steps/test.rs`
-> Added `test::StdarchVerify`  in `src/bootstrap/src/core/builder/mod.rs`

Tests:
-> Running `./x.py test library/stdarch/crates/stdarch-verify`  builds compiler and std  successfully.
-> All  three integration tests Passes:
     tests/arm.rs
     tests/mips.rs
     tests/x86-intel.rs
-> Doc tests for `stdarch_verify` also Passes.

r? @Kobzol
…clone, r=joboet

lib: specialize Clone of array IntoIter

This PR adds the `TrivialClone` specialization to the `PolymorphicIter` type, which `array::IntoIter` uses. I also added another coretest for the default case (already existing test catches the specialized one).

There are no unwinding concerns since `TrivialClone` means cloning = copying and we never call `Clone::clone`.

`array:IntoIter` is being used on a lot of places in both `core` and in user code, and `array::IntoIter` (nor does its users) override `Clone` often and just delegate to the inner type `PolymorphicIter` which does not yet do the `TrivialClone` specialization and is burdened by the iterator and unwind safety shenanigans for all types, so this PR should address some of that. This should in turn slightly reduce both stack usage and remove unwinding prologue/epilogue etc. from such functions and improve our `-Cno-prepopulate-passes` codegen too.

perf: https://godbolt.org/z/eTPjj3hP3
…nwind, r=dianqk

Stop needing an alloca for `catch_unwind`

Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle.

cc rust-lang#153250 rust-lang/compiler-team#970

While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder.

r? dianqk
…RalfJung

Add splitting caveats to `{read,write}_volatile`

It sounds like we don't actually have guarantees right now ([#t-opsem > Defining volatile splitting @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Defining.20volatile.20splitting/near/597476292)) so let's document that.  I think this doesn't need an FCP since it's not actually guaranteeing anything.
…r=yotamofek

Fix `cfg` typo in rustdoc book

Fixes typo spotted by @yotamofek [here](rust-lang#157039 (comment)).

r? @yotamofek
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 28, 2026
@rustbot rustbot added 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 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-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. labels May 28, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@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-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 28, 2026

📌 Commit 89ca95d has been approved by JonathanBrouwer

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 May 28, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 28, 2026
Rollup of 5 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-2
@rust-log-analyzer
Copy link
Copy Markdown
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)

---- [assembly] tests/assembly-llvm/wasm_exceptions.rs stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
warning: unstable feature specified for `-Ctarget-feature`: `exception-handling`
  |
  = note: this feature is not stably supported; its behavior can change in the future

error[E0641]: cannot cast from a pointer of an unknown kind
##[error]  --> /checkout/tests/assembly-llvm/wasm_exceptions.rs:53:36
---
------------------------------------------

error: compilation failed!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/assembly-llvm/wasm_exceptions.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/x86_64-unknown-linux-gnu/stage2" "--target=wasm32-wasip1" "--check-cfg" "cfg(test,FALSE)" "-O" "-Cdebug-assertions=no" "-Zcodegen-source-order" "--emit" "asm" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/wasm_exceptions/wasm_exceptions.s" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-C" "target-feature=+exception-handling" "-C" "panic=unwind"
stdout: none
--- stderr -------------------------------
warning: unstable feature specified for `-Ctarget-feature`: `exception-handling`
  |
  = note: this feature is not stably supported; its behavior can change in the future

error[E0641]: cannot cast from a pointer of an unknown kind
##[error]  --> /checkout/tests/assembly-llvm/wasm_exceptions.rs:53:36
---
---- [assembly] tests/assembly-llvm/wasm_exceptions.rs stdout end ----
---- [assembly] tests/assembly-llvm/wasm_legacy_eh.rs stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
warning: unstable feature specified for `-Ctarget-feature`: `exception-handling`
  |
  = note: this feature is not stably supported; its behavior can change in the future

error[E0641]: cannot cast from a pointer of an unknown kind
##[error]  --> /checkout/tests/assembly-llvm/wasm_legacy_eh.rs:63:36
---
------------------------------------------

error: compilation failed!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/assembly-llvm/wasm_legacy_eh.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/x86_64-unknown-linux-gnu/stage2" "--target=wasm32-wasip1" "--check-cfg" "cfg(test,FALSE)" "-O" "-Cdebug-assertions=no" "-Zcodegen-source-order" "--emit" "asm" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly-llvm/wasm_legacy_eh/wasm_legacy_eh.s" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-C" "target-feature=+exception-handling" "-C" "panic=unwind" "-C" "llvm-args=-wasm-use-legacy-eh=true"
stdout: none
--- stderr -------------------------------
warning: unstable feature specified for `-Ctarget-feature`: `exception-handling`
  |
  = note: this feature is not stably supported; its behavior can change in the future

error[E0641]: cannot cast from a pointer of an unknown kind
##[error]  --> /checkout/tests/assembly-llvm/wasm_legacy_eh.rs:63:36

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 28, 2026

PR #156867, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 28, 2026
@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 May 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 28, 2026

💔 Test for b3be40b failed: CI. Failed job:

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-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants