Rollup of 4 pull requests#156546
Open
JonathanBrouwer wants to merge 11 commits into
Open
Conversation
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
Contributor
Author
|
@bors r+ rollup=never p=1000 |
Contributor
This comment has been minimized.
This comment has been minimized.
Contributor
|
💔 Test for 0f42d11 failed: CI. Failed job:
|
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) |
Member
|
@bors retry ghcr.io failed again |
Contributor
|
⌛ Testing commit ea715cb with merge 8008927... Workflow: https://github.com/rust-lang/rust/actions/runs/25803550929 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
reveal_actual_levelimprovements #156536 (reveal_actual_levelimprovements)r? @ghost
Create a similar rollup