Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up🛠 introduce abstraction layer between trait solver and type checker #48895
Comments
This comment has been minimized.
This comment has been minimized.
Mentoring instructions (part 1)How it works todayThe main interaction that the type checker has with the fulfillment context is to "register" obligations with it and try to solve them. Registering is primarily done with this method: rust/src/librustc/traits/fulfill.rs Lines 147 to 149 in fedce67 Solving is done with rust/src/librustc/traits/fulfill.rs Lines 193 to 195 in fedce67 And rust/src/librustc/traits/fulfill.rs Lines 175 to 177 in fedce67 Step 1: Introduce
|
nikomatsakis
added
T-compiler
WG-compiler-traits
A-traits
labels
Mar 9, 2018
This comment has been minimized.
This comment has been minimized.
|
cc @rust-lang/wg-traits -- this is the refactoring step that will allow us to introduce |
This comment has been minimized.
This comment has been minimized.
|
This is the sort of structural change that is right up my alley (but I also have a non-zero number of things already on my plate so if someone else is looking for a thing to do, go for it) |
cuviper
added
the
C-cleanup
label
Mar 10, 2018
This comment has been minimized.
This comment has been minimized.
|
This work looks not so hard for a rustlang newbie from the mentoring instructions up to now. If I didn’t underestimate the difficulty, please consider me for this. |
This comment has been minimized.
This comment has been minimized.
nikomatsakis
changed the title
introduce abstraction layer between trait solver and type checker
🛠 introduce abstraction layer between trait solver and type checker
Mar 12, 2018
nikomatsakis
assigned
nikomatsakis and
csmoe
and unassigned
nikomatsakis
Mar 12, 2018
This comment has been minimized.
This comment has been minimized.
|
@csmoe How goes? Have you had a chance to take a look at this yet? It would be very useful. =) |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis I have done mostly, but stuck at the lifetime errors. |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this issue
Mar 27, 2018
bors
added a commit
that referenced
this issue
Mar 27, 2018
bors
added a commit
that referenced
this issue
Mar 27, 2018
This comment has been minimized.
This comment has been minimized.
|
This is basically done enough for now I think |
nikomatsakis commentedMar 9, 2018
•
edited
The purpose of this issue is to setup a trait-solving structure that can change between the current trait solver and the type checker, allowing for us to easily switch to the chalk-style solving when a command line flag is given.
Currently, the interface between the two is the
FulfillmentContext, so we have a relationship like this:The first phase then is to introduce another layer in between, let's call it the
TraitEngine:When we're done with this phase, everything should work exactly the same, but that the type checker never interacts directly with the fulfillment context.