Skip to content

Conversation

@celinval
Copy link
Contributor

We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic.

I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface.

r? @oli-obk

cc: @makai410

@rustbot
Copy link
Collaborator

rustbot commented Oct 20, 2025

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a

@rustbot rustbot 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 Oct 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 20, 2025

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

Copy link
Contributor

@makai410 makai410 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall solution LGTM.

View changes since this review

@bors
Copy link
Collaborator

bors commented Oct 21, 2025

☔ The latest upstream changes (presumably #147928) made this pull request unmergeable. Please resolve the merge conflicts.

@celinval celinval closed this Oct 27, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 27, 2025
@celinval celinval reopened this Oct 27, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 27, 2025
@celinval
Copy link
Contributor Author

r? @compiler-errors

Are you able to take this one? It looks like @oli-obk is off.

@rustbot rustbot assigned compiler-errors and unassigned oli-obk Oct 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2025

compiler-errors is not on the review rotation at the moment.
They may take a while to respond.

@celinval
Copy link
Contributor Author

r? stable-mir

@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2025

Failed to set assignee to stable-mir: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@compiler-errors
Copy link
Member

Not working on Rust for a while unfortunately.

@celinval
Copy link
Contributor Author

r? project-stable-mir

@rustbot rustbot assigned scottmcm and unassigned compiler-errors Oct 27, 2025
@scottmcm
Copy link
Member

Since this is stable MIR and shouldn't impact other stuff I can attempt to review this, albeit without knowing much about the specific details of what it's doing.

Looks like there's a conflict right now, though?

@oli-obk
Copy link
Contributor

oli-obk commented Oct 29, 2025

I can review, I just can't be on the rotation rn

@oli-obk oli-obk assigned oli-obk and unassigned scottmcm Oct 29, 2025
Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is super straight forward. Nice cleanup!

View changes since this review

@oli-obk
Copy link
Contributor

oli-obk commented Oct 29, 2025

r=me after rebase

We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also removing the Container struct and replacing the CompilerInterface trait with a struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface.
@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@celinval
Copy link
Contributor Author

@bors r=@oli-obk rollup

@bors
Copy link
Collaborator

bors commented Oct 29, 2025

📌 Commit e0b8dd3 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors 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 Oct 29, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 30, 2025
Simplify rustc_public context handling We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface. r? `@oli-obk` cc: `@makai410`
bors added a commit that referenced this pull request Oct 30, 2025
Rollup of 9 pull requests Successful merges: - #138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - #147858 (Micro-optimization attempt in coroutine layout computation) - #147923 (Simplify rustc_public context handling) - #147935 (Add LLVM realtime sanitizer) - #148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - #148137 (Couple of changes for Redox OS) - #148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - #148193 (Remove `QPath::LangItem`) - #148253 (Handle default features and -Ctarget-features in the dummy backend) r? `@ghost` `@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Oct 30, 2025
Simplify rustc_public context handling We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface. r? ``@oli-obk`` cc: ``@makai410``
bors added a commit that referenced this pull request Oct 30, 2025
Rollup of 8 pull requests Successful merges: - #138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - #147858 (Micro-optimization attempt in coroutine layout computation) - #147923 (Simplify rustc_public context handling) - #148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - #148137 (Couple of changes for Redox OS) - #148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - #148253 (Handle default features and -Ctarget-features in the dummy backend) - #148272 (Align VEX V5 boot routine to 4 bytes) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

7 participants