-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial refactor of InferCtxt towards unified type checking state and per item side tables #26582
Conversation
Placing |
☔ The latest upstream changes (presumably #26415) made this pull request unmergeable. Please resolve the merge conflicts. |
r+ from me once we resolve nits, get things building |
4025071
to
57f8253
Compare
@bors r+ |
📌 Commit 57f8253 has been approved by |
☔ The latest upstream changes (presumably #26575) made this pull request unmergeable. Please resolve the merge conflicts. |
🔒 Merge conflict |
This first patch starts by moving around pieces of state related to type checking. The goal is to slowly unify the type checking state into a single typing context. This initial patch moves the ParameterEnvironment into the InferCtxt and moves shared tables from Inherited and ty::ctxt into their own struct Tables. This is the foundational work to refactoring the type checker to enable future evolution of the language and tooling.
57f8253
to
fd412ab
Compare
cast_kinds: RefCell::new(NodeMap()), | ||
}, f) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a rebase mishap (this function is gone on master, moved to ctxt::create_and_enter
).
fd412ab
to
15bc4a3
Compare
@bors r=nikomatsakis p=1 |
📌 Commit 15bc4a3 has been approved by |
⌛ Testing commit 15bc4a3 with merge 84855fe... |
This branch begins the work of unifying our type checking contexts into a single piece of state. The goal is to eventually have a single context that we can pass around instead of the fractured situation we currently have. There are still several things that must be done before beginning to make tables item local: - [ ] move FulfillmentContext into InferCtxt - [ ] modify SelectionContext to only take a single context argument - [ ] remove remaining typer impls - [ ] remove the ClosureTyper + Typer trait - [ ] do some renaming to make these things more applicable to their new roles r? @nikomatsakis As a side note there are a couple oddities that are temporary refactors that will be quickly cleaned up in a follow-up PR. cc @eddyb @Aatch @arielb1 @nrc
💔 Test failed - auto-mac-32-opt |
@bors r=nikomatsakis |
📌 Commit 5c3753f has been approved by |
This branch begins the work of unifying our type checking contexts into a single piece of state. The goal is to eventually have a single context that we can pass around instead of the fractured situation we currently have. There are still several things that must be done before beginning to make tables item local: - [ ] move FulfillmentContext into InferCtxt - [ ] modify SelectionContext to only take a single context argument - [ ] remove remaining typer impls - [ ] remove the ClosureTyper + Typer trait - [ ] do some renaming to make these things more applicable to their new roles r? @nikomatsakis As a side note there are a couple oddities that are temporary refactors that will be quickly cleaned up in a follow-up PR. cc @eddyb @Aatch @arielb1 @nrc
This branch begins the work of unifying our type checking contexts into a single piece of state. The goal is to eventually have a single context that we can pass around instead of the fractured situation we currently have. There are still several things that must be done before beginning to make tables item local:
r? @nikomatsakis
As a side note there are a couple oddities that are temporary refactors that will be quickly cleaned up in a follow-up PR.
cc @eddyb @Aatch @arielb1 @nrc