Skip to content

Rollup of 21 pull requests - #160437

Closed
JonathanBrouwer wants to merge 281 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-03lFkkZ
Closed

Rollup of 21 pull requests#160437
JonathanBrouwer wants to merge 281 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-03lFkkZ

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

djc and others added 30 commits May 12, 2026 17:09
Adds an unstable `extern "Swift"` ABI behind the `abi_swift` feature
gate, mapping to LLVM's `swiftcc` calling convention. Cranelift and
GCC backends fall back to the platform default since they have no
equivalent.
Add Swift function call ABI

Adds an unstable `extern "Swift"` ABI behind the `abi_swift` feature gate, mapping to LLVM's `swiftcc` calling convention. This is only allowed (a) for `is_darwin_like` targets, since the [ABI is only stable for those platforms](https://www.swift.org/blog/abi-stability-and-more/) and (b) with the LLVM backend, since the other backends don't support it.

Current approaches to interoperability with Swift lower to Objective-C (or require a Swift stub exposing a C ABI), but that is an optional mapping on the Swift side that some newer Apple frameworks omit. It would be great to be able to more directly/natively be able to call into Swift code directly via its stable API (on Apple platforms at least).

Reimplements rust-lang#64582 on top of current main. The main objection to the previous PR seemed to be that it needed an RFC, but there was pushback (which seems sensible to me) that an RFC could be deferred until stabilization.

I think this needs a tracking issue? Would be happy to write one up if/when there is a consensus that this will be merged.
Add CI check when building sysroot with GCC backend and running libcore tests with it



Fixes rust-lang/rustc_codegen_gcc#882.

Is it what you had in mind @Kobzol?

r? @Kobzol
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.
…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
Couple of changes to help with moving LTO to the link phase

Part of rust-lang/compiler-team#908
A `SwitchInt` with only an `otherwise` target reaches the backend as a
switch with an empty case list. `gcc_jit_block_end_with_switch` requires
an integer discriminant, so it rejects the `bool` discriminant produced
by a range-pattern comparison under `-Zmir-preserve-ub`, which keeps the
otherwise-simplified switch instead of lowering it to a `goto`.

Such a switch is equivalent to an unconditional jump to the default
block, so emit that instead.
Unlike the compile-time TEST_FLAGS, this is read at run time so a
single test can opt into flags such as -Zmir-preserve-ub through an
ignore-if directive that checks whether the variable is set.
A range-pattern match compiled with -Zmir-preserve-ub leaves a
SwitchInt with no cases whose discriminant is a bool comparison
result. The test is skipped unless CARGO_TEST_FLAGS is set so it only
runs when that flag is passed.
The test opts into -Zmir-preserve-ub through CARGO_TEST_FLAGS and is
skipped when that variable is unset, so the default cargo-tests run
never exercises it. Invoke it explicitly with the flag set.
…-cases

builder: Emit a plain jump for a switch with no cases
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 3, 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-*,dist-i686-linux,dist-aarch64-linux

@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 861dd34 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 Aug 3, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 3, 2026
Rollup of 21 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-*
try-job: dist-i686-linux
try-job: dist-aarch64-linux
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors p=7

@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 861dd34 with merge b6b6abb...

Workflow: https://github.com/rust-lang/rust/actions/runs/30825363920

rust-bors Bot pushed a commit that referenced this pull request Aug 3, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #159844 (Subtree cg_gcc sync (2026-07-24))
 - #159326 (Deny multiple EII impls on a single item)
 - #159535 (Optimize slice::contains for bytewise types)
 - #159595 (Promote loongarch32-unknown-none* to Tier 2)
 - #160007 (allow `-Ldependency` search paths for panic runtimes)
 - #160320 (point at trait definition when it is used as a derive macro)
 - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names)
 - #160406 (`DepKind` cleanups)
 - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism)
 - #159014 ([rustdoc] Do not take `doc(cfg())` into account when filtering doctests)
 - #159303 (Fix ICE for direct inline const generic defaults)
 - #159977 (Add regression test for bool indexing codegen)
 - #160165 (reject `...` without pattern post-expansion)
 - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided)
 - #160305 (Linkify C-SKY targets in `platform-support.md`)
 - #160314 (fix borrowck ICE for consts with fn pointer type)
 - #160322 (ElaborateBoxDeref: remove unnecessary projection)
 - #160338 (Add regression test for supertrait associated type normalization through dyn)
 - #160340 (Add regression test for unused_parens on contract clauses)
 - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`)
 - #160384 (Add PR body notes for Cargo lock file maintenance)
@rust-log-analyzer

Copy link
Copy Markdown
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)
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - arch (line 282) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - arch (line 246) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - core_arch::arch (line 59) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/mod.rs - core_arch::arch::wasm32 (line 158) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/nvptx/mod.rs - core_arch::nvptx::vprintf (line 160) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128 (line 89) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128d (line 136) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128i (line 42) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m256 (line 234) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m256d (line 281) ... ignored

@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r-

@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 Aug 3, 2026
@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

View changes since this unapproval

@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4c5b250 failed: CI. Failed jobs:

@rust-bors

rust-bors Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR #159014, which is a member of this rollup, was 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 Aug 3, 2026
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-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows rollup A PR which is a rollup T-clippy Relevant to the Clippy team. 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. 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.