implement the skeleton of the updated trait solver#105661
Merged
bors merged 2 commits intorust-lang:masterfrom Dec 23, 2022
Merged
implement the skeleton of the updated trait solver#105661bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
afa7c1e to
491f0fb
Compare
This comment was marked as outdated.
This comment was marked as outdated.
0d7b5b5 to
84c9bb3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
compiler-errors
approved these changes
Dec 20, 2022
Contributor
compiler-errors
left a comment
There was a problem hiding this comment.
Cool!
Other team members or initiative group members can and should leave reviews inline after this lands if they have the opportunty to read through this PR, but landing this now is very low risk because it's not hooked up to anything yet 😸
Contributor
|
@bors r+ not compelled to put rollup=never b/c it's a big PR but doesn't really touch existing files, nor should we need to bisect here really. |
Collaborator
|
📌 Commit 89fb51a2a29cbb2a3fd5a8e8e4fc327f3ab7fc44 has been approved by It is now in the queue for this repository. |
Collaborator
|
⌛ Testing commit 89fb51a2a29cbb2a3fd5a8e8e4fc327f3ab7fc44 with merge c88a482905f2889192a86e9a8a31368d9c819547... |
Collaborator
|
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@bors r=compiler-errors |
Collaborator
fee1-dead
added a commit
to fee1-dead-contrib/rust
that referenced
this pull request
Dec 21, 2022
implement the skeleton of the updated trait solver cc `@rust-lang/initiative-trait-system-refactor` This is mostly following the architecture discussed in the types team meetup. After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible. This somewhat closely mirrors the current `evaluate` implementation with the following notable differences: - it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive) - it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful) - it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality) - it is implemented to work with lazy normalization A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work. r? `@compiler-errors` / `@rust-lang/types` :3
fee1-dead
added a commit
to fee1-dead-contrib/rust
that referenced
this pull request
Dec 21, 2022
implement the skeleton of the updated trait solver cc ``@rust-lang/initiative-trait-system-refactor`` This is mostly following the architecture discussed in the types team meetup. After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible. This somewhat closely mirrors the current `evaluate` implementation with the following notable differences: - it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive) - it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful) - it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality) - it is implemented to work with lazy normalization A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work. r? ``@compiler-errors`` / ``@rust-lang/types`` :3
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 23, 2022
Rollup of 6 pull requests Successful merges: - rust-lang#105661 (implement the skeleton of the updated trait solver) - rust-lang#105853 (Make the pre-push script work on directories with spaces) - rust-lang#106043 (Move tests) - rust-lang#106048 (Run `tidy` in its own job in PR CI) - rust-lang#106055 (Check arg expressions properly on error in `confirm_builtin_call`) - rust-lang#106067 (A few metadata nits) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc @rust-lang/initiative-trait-system-refactor
This is mostly following the architecture discussed in the types team meetup.
After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible.
This somewhat closely mirrors the current
evaluateimplementation with the following notable differences:projectinto the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive)A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work.
r? @compiler-errors / @rust-lang/types :3