Skip to content

Move impl Interner for TyCtxt to its own submodule#152148

Open
Zalathar wants to merge 3 commits intorust-lang:mainfrom
Zalathar:tcx-interner
Open

Move impl Interner for TyCtxt to its own submodule#152148
Zalathar wants to merge 3 commits intorust-lang:mainfrom
Zalathar:tcx-interner

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Feb 5, 2026

This impl is several hundred lines of mostly self-contained, mostly boilerplate code that can be extracted out of the dauntingly large rustc_middle::ty::context module.


There should be no change to compiler behaviour.

Requiring `fn` in the macro syntax makes it a little more obvious that the
macro declares functions with those names, and makes them easier to grep for.
@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 Feb 5, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 5, 2026

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Zalathar
Copy link
Member Author

Zalathar commented Feb 5, 2026

I had been looking into whether it's feasible to extract TyCtxt and GlobalCtxt into their own module (since context.rs is so big and incoherent), when I stumbled upon this other chunk of extractable code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants