Skip to content

rustc_public: add with_cx() to CompilerInterface#157116

Open
makai410 wants to merge 1 commit into
rust-lang:mainfrom
makai410:with-tcx-refactor
Open

rustc_public: add with_cx() to CompilerInterface#157116
makai410 wants to merge 1 commit into
rust-lang:mainfrom
makai410:with-tcx-refactor

Conversation

@makai410
Copy link
Copy Markdown
Member

Changes a bunch of:

let cx = self.cx.borrow();
let mut tables = self.tables.borrow_mut();

to:

with_cx(|tables, cx| { ... })

in compiler_interface.rs.

r? @celinval

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 29, 2026

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 May 29, 2026
Copy link
Copy Markdown
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.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 29, 2026

📌 Commit f6cbfd9 has been approved by oli-obk

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1. This pull request will be tested once the tree is reopened.

@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 29, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 29, 2026
rustc_public: add `with_cx()` to `CompilerInterface`

Changes a bunch of:
```rust
let cx = self.cx.borrow();
let mut tables = self.tables.borrow_mut();
```
to:
```rust
with_cx(|tables, cx| { ... })
```
in `compiler_interface.rs`.

r? @celinval
rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error)
 - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering)
 - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`)
 - #157053 (Eagerly resolve delegations in late resolution)
 - #157068 (NVPTX: Remove the unstable ptx linker flavor)
 - #157076 (Various proc-macro related code cleanups)
 - #157106 (add ABI check logic for wasm)
 - #154835 (std::offload sharedmem)
 - #157065 (Stabilize `Path::is_empty`)
 - #157088 (Improve suggestions for malformed deprecated attribute)
 - #157098 (Add the `clflushopt` x86 target feature)
 - #157103 (Add reproducibly failing tests for parallel frontend)
 - #157111 (Update target maintainer for x86_64-unknown-linux-none)
 - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`)
 - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`)
 - #157120 (Cleanups around attribute target checking)

Failed merges:

 - #157100 (Some more per owner things)
rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error)
 - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering)
 - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`)
 - #157053 (Eagerly resolve delegations in late resolution)
 - #157068 (NVPTX: Remove the unstable ptx linker flavor)
 - #157076 (Various proc-macro related code cleanups)
 - #157106 (add ABI check logic for wasm)
 - #154835 (std::offload sharedmem)
 - #157065 (Stabilize `Path::is_empty`)
 - #157088 (Improve suggestions for malformed deprecated attribute)
 - #157098 (Add the `clflushopt` x86 target feature)
 - #157103 (Add reproducibly failing tests for parallel frontend)
 - #157111 (Update target maintainer for x86_64-unknown-linux-none)
 - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`)
 - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`)
 - #157120 (Cleanups around attribute target checking)

Failed merges:

 - #157100 (Some more per owner things)
rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error)
 - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering)
 - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`)
 - #157053 (Eagerly resolve delegations in late resolution)
 - #157068 (NVPTX: Remove the unstable ptx linker flavor)
 - #157076 (Various proc-macro related code cleanups)
 - #157106 (add ABI check logic for wasm)
 - #154835 (std::offload sharedmem)
 - #157065 (Stabilize `Path::is_empty`)
 - #157088 (Improve suggestions for malformed deprecated attribute)
 - #157098 (Add the `clflushopt` x86 target feature)
 - #157103 (Add reproducibly failing tests for parallel frontend)
 - #157111 (Update target maintainer for x86_64-unknown-linux-none)
 - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`)
 - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`)
 - #157120 (Cleanups around attribute target checking)

Failed merges:

 - #157100 (Some more per owner things)
rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error)
 - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering)
 - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`)
 - #157053 (Eagerly resolve delegations in late resolution)
 - #157068 (NVPTX: Remove the unstable ptx linker flavor)
 - #157076 (Various proc-macro related code cleanups)
 - #157106 (add ABI check logic for wasm)
 - #154835 (std::offload sharedmem)
 - #157065 (Stabilize `Path::is_empty`)
 - #157088 (Improve suggestions for malformed deprecated attribute)
 - #157098 (Add the `clflushopt` x86 target feature)
 - #157103 (Add reproducibly failing tests for parallel frontend)
 - #157111 (Update target maintainer for x86_64-unknown-linux-none)
 - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`)
 - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`)
 - #157120 (Cleanups around attribute target checking)

Failed merges:

 - #157100 (Some more per owner things)
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants