Skip to content

Remove early_exit closures - #159647

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
nnethercote:rm-early_exit-closures
Jul 22, 2026
Merged

Remove early_exit closures#159647
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
nnethercote:rm-early_exit-closures

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

Details in individual commits.

r? @bjorn3

There are two `early_exit` closures in `run_compiler` that ensure
`abort_if_errors` is called on all the early exit paths.
However, these early exit paths all occur in the closure passed to
`interface::run_compiler`. And what does `interface::run_compiler` do
after calling the passed-in closure? It calls `finish_diagnostic`
(always) and then `abort_if_errors` (if the closure didn't panic).
So we can drop the `early_exit` calls and get the same behaviour.
@rustbotrustbot added 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 Jul 21, 2026
@bjorn3

Copy link
Copy Markdown
Member

r=me with CI green

@nnethercote

Copy link
Copy Markdown
ContributorAuthor

Green.

@bors r=bjorn3

@rust-bors

rust-borsBot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a235d0d has been approved by bjorn3

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 Jul 21, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 21, 2026
…, r=bjorn3
Remove `early_exit` closures
Details in individual commits.
r? @bjorn3
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 21, 2026
…, r=bjorn3
Remove `early_exit` closures
Details in individual commits.
r? @bjorn3
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 21, 2026
…, r=bjorn3
Remove `early_exit` closures
Details in individual commits.
r? @bjorn3
rust-borsBot pushed a commit that referenced this pull request Jul 21, 2026
Rollup of 12 pull requests
Successful merges:
- #159582 (Sync from portable simd 2026 07 20)
- #158890 (Fix splat v0 mangling)
- #159411 ([rustdoc] Correctly handle output options with --show-coverage)
- #159647 (Remove `early_exit` closures)
- #159656 (define a `Simd` type in `minicore`)
- #156474 (Add paths for linked associated items)
- #159211 (Fix debuginfo argument when invoking LLBC linker)
- #159527 (Bring runtime symbols statics on par with foreign functions)
- #159625 (Refactor is_opsem_inhabited)
- #159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`)
- #159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap )
- #159663 (Add layout cycle hang regression test)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 22, 2026
…, r=bjorn3
Remove `early_exit` closures
Details in individual commits.
r? @bjorn3
This was referenced Jul 22, 2026
rust-borsBot pushed a commit that referenced this pull request Jul 22, 2026
Rollup of 13 pull requests
Successful merges:
- #159582 (Sync from portable simd 2026 07 20)
- #158890 (Fix splat v0 mangling)
- #159614 (debuginfo generation for unsafe binders)
- #159647 (Remove `early_exit` closures)
- #159656 (define a `Simd` type in `minicore`)
- #156474 (Add paths for linked associated items)
- #159211 (Fix debuginfo argument when invoking LLBC linker)
- #159527 (Bring runtime symbols statics on par with foreign functions)
- #159625 (Refactor is_opsem_inhabited)
- #159629 (Add more splat rust-call regression tests)
- #159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`)
- #159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap )
- #159663 (Add layout cycle hang regression test)
rust-borsBot pushed a commit that referenced this pull request Jul 22, 2026
Rollup of 13 pull requests
Successful merges:
- #159582 (Sync from portable simd 2026 07 20)
- #158890 (Fix splat v0 mangling)
- #159614 (debuginfo generation for unsafe binders)
- #159647 (Remove `early_exit` closures)
- #159656 (define a `Simd` type in `minicore`)
- #156474 (Add paths for linked associated items)
- #159211 (Fix debuginfo argument when invoking LLBC linker)
- #159527 (Bring runtime symbols statics on par with foreign functions)
- #159625 (Refactor is_opsem_inhabited)
- #159629 (Add more splat rust-call regression tests)
- #159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`)
- #159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap )
- #159663 (Add layout cycle hang regression test)
@rust-bors
rust-borsBot merged commit 4bfd047 into rust-lang:mainJul 22, 2026
13 checks passed
@rustbotrustbot added this to the 1.99.0 milestone Jul 22, 2026
rust-timer added a commit that referenced this pull request Jul 22, 2026
Rollup merge of #159647 - nnethercote:rm-early_exit-closures, r=bjorn3
Remove `early_exit` closures
Details in individual commits.
r? @bjorn3
pullBot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jul 22, 2026
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#159582 (Sync from portable simd 2026 07 20)
- rust-lang/rust#158890 (Fix splat v0 mangling)
- rust-lang/rust#159614 (debuginfo generation for unsafe binders)
- rust-lang/rust#159647 (Remove `early_exit` closures)
- rust-lang/rust#159656 (define a `Simd` type in `minicore`)
- rust-lang/rust#156474 (Add paths for linked associated items)
- rust-lang/rust#159211 (Fix debuginfo argument when invoking LLBC linker)
- rust-lang/rust#159527 (Bring runtime symbols statics on par with foreign functions)
- rust-lang/rust#159625 (Refactor is_opsem_inhabited)
- rust-lang/rust#159629 (Add more splat rust-call regression tests)
- rust-lang/rust#159652 (Remove `cfg(not(no_global_oom_handling))` from the `Drop` impl of `UniqueArcUninit`)
- rust-lang/rust#159657 (Remove the blanket `#![cfg_attr(test, allow(unused))]` from bootstrap )
- rust-lang/rust#159663 (Add layout cycle hang regression test)
@nnethercote
nnethercote deleted the rm-early_exit-closures branch July 22, 2026 21:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

3 participants

@nnethercote@bjorn3@rustbot