Skip to content
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

Separate Program from ProgramEnvironment. #23

Merged
merged 1 commit into from
Mar 14, 2017

Conversation

withoutboats
Copy link
Contributor

Closes #19. I took a slightly different approach from your suggestion.

ir::Program and ProgramEnvironment are distinct types with no ownership
relationship, but instead of lowering returning a tuple, ir::Program
has a method to construct a ProgramEnvironment.

In addition to the trait_data, the associated_type_data also needs to
be cloned over, and the split_projection method is duplicated for
both types, because that method is invoked in elaborated_clauses.

It seems like once we have a new way of solving #12, ProgramEnvironment
would just be a set of ProgramClauses, and that would be the whole
context necessary for the solver to run.

Closes rust-lang#19. I took a slightly different approach from your suggestion.

ir::Program and ProgramEnvironment are distinct types with no ownership
relationship, but instead of lowering returning a tuple, ir::Program
has a method to construct a ProgramEnvironment.

In addition to the trait_data, the associated_type_data also needs to
be cloned over, and the `split_projection` method is duplicated for
both types, because that method is invoked in `elaborated_clauses`.

It seems like once we have a new way of solving rust-lang#12, ProgramEnvironment
would just be a set of ProgramClauses, and that would be the whole
context necessary for the solver to run.
@nikomatsakis nikomatsakis merged commit 16327a3 into rust-lang:master Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants