Introduce SolverRelating type relation to the new solver code#128744
Closed
compiler-errors wants to merge 3 commits intorust-lang:masterfrom
Closed
Introduce SolverRelating type relation to the new solver code#128744compiler-errors wants to merge 3 commits intorust-lang:masterfrom
SolverRelating type relation to the new solver code#128744compiler-errors wants to merge 3 commits intorust-lang:masterfrom
Conversation
Collaborator
|
changes to the core type system |
This comment has been minimized.
This comment has been minimized.
d39fa4d to
162dfa0
Compare
Contributor
|
generally in favor of splitting |
lcnr
reviewed
Aug 7, 2024
Contributor
|
we discussed that we'll have to add |
Contributor
|
@rustbot author |
Collaborator
|
☔ The latest upstream changes (presumably #129365) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
Author
|
I'll need to totally rework this, so closing for now and putting it back onto my TODO list for a fresh PR, which will be soon hopefully. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 10, 2024
Introduce SolverRelating type relation to the new solver Redux of rust-lang#128744. Splits out relate for the new solver so that implementors don't need to implement it themselves. r? lcnr
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.
This "uplifts" (i.e. duplicates) the
TypeRelatingdelegate into the new solver as a new relation calledSolverRelating, so we can use that rather than exposingInferCtxtLike::relatefor implementations to have to implement themselves.The reason I duplicated rather than fully uplifted
TypeRelatingis because it's so complicated.CombineFieldsis a bunch of unnecessary machinery that only exists to track aTraceand to make it easy to swap betweenLub/Glb.next_trait_solverbranches in in thesuper_combine_{const,ty}functions, and in theTypeRelatingcode itself that can be folded away.This then allows us to remove
StructurallyRelateAliasesfromPredicateEmittingRelationand move it directly onto the generalizerinstantiate_*_varfunctions.r? @lcnr -- I'm curious what you think of this approach in general.