Skip to content

Rollup of 4 pull requests#156546

Open
JonathanBrouwer wants to merge 11 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-5MJf3XL
Open

Rollup of 4 pull requests#156546
JonathanBrouwer wants to merge 11 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-5MJf3XL

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

chenyukang and others added 11 commits May 12, 2026 02:11
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.
`reveal_actual_level` has two call sites, which look like this:
```
let (level, mut src) = self.raw_lint_id_level(lint, idx, aux);
let (level, lint_id) = reveal_actual_level(level, &mut src, sess, lint, |id| {
    self.raw_lint_id_level(id, idx, aux)
});
```
and:
```
let (level, mut src) = self.probe_for_lint_level(tcx, lint, cur);
let (level, lint_id) = reveal_actual_level(level, &mut src, tcx.sess, lint, |lint| {
    self.probe_for_lint_level(tcx, lint, cur)
});
```
They both have the same pattern: there's a prior call expression that is then
repeated within a closure passed to `reveal_actual_level`.

This commit moves that prior call inside `reveal_actual_level`, making things
simpler.
It currently returns a triple: `(Level, Option<LintExpectationId>,
LintLevelSource)`. That's structurally identical to `LevelAndSource`, so
this commit changes it accordingly.
It's currrently `(Option<(Level, Option<LintExpectationId>)>,
LintLevelSource)`. But when the first element of the pair is `None` the
second element is always `LintLevelSource::Default`. So this commit
moves the `LintLevelSource` within the `Option`, which simplifies
things a bit.
Again, the returned triple is equivalent to `LevelAndSource`.
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.
…d-assignments-diverging, r=oli-obk

Fix unused assignments in diverging branches

Fixes rust-lang#156416

Add `location` and use `is_predecessor_of` to check in the control flow graph.

r? @ghost
I'd like to see whether there is performence regression.
…provements, r=GuillaumeGomez

`reveal_actual_level` improvements

Details in individual commits.

r? @GuillaumeGomez
…r=ehuss

Update rustbook dependencies to remove windows-targets dependency

Part of rust-lang#156459
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 13, 2026
@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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 13, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=1000

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 13, 2026

📌 Commit ea715cb 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 13, 2026
@rust-bors

This comment has been minimized.

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

Rollup of 4 pull requests

Successful merges:

 - #155815 (Add Swift function call ABI)
 - #156425 (Fix unused assignments in diverging branches)
 - #156536 (`reveal_actual_level` improvements)
 - #156543 (Update rustbook dependencies to remove windows-targets dependency)
@rust-bors rust-bors Bot 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 May 13, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 13, 2026

💔 Test for 0f42d11 failed: CI. Failed job:

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

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

@bjorn3
Copy link
Copy Markdown
Member

bjorn3 commented May 13, 2026

@bors retry ghcr.io failed again

@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 13, 2026
rust-bors Bot pushed a commit that referenced this pull request May 13, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #155815 (Add Swift function call ABI)
 - #156425 (Fix unused assignments in diverging branches)
 - #156536 (`reveal_actual_level` improvements)
 - #156543 (Update rustbook dependencies to remove windows-targets dependency)
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 13, 2026

⌛ Testing commit ea715cb with merge 8008927...

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

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. 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-compiler Relevant to the compiler 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