Prefer param-env candidates that do no inference in new solver#109579
Closed
compiler-errors wants to merge 2 commits intorust-lang:masterfrom
Closed
Prefer param-env candidates that do no inference in new solver#109579compiler-errors wants to merge 2 commits intorust-lang:masterfrom
compiler-errors wants to merge 2 commits intorust-lang:masterfrom
Conversation
Collaborator
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
201bfac to
a22dd55
Compare
lcnr
reviewed
Mar 27, 2023
Collaborator
|
☔ The latest upstream changes (presumably #109662) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
Author
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Apr 10, 2023
…rors prioritize param env candidates if they don't guide type inference intended to supersede rust-lang#109579. We disable the prioritization during coherence to maintain completeness. Long term we can hopefully replace this hack with adding OR to external constraints at which point the only relevant part when merging responses is whether they guide type inference in the same way. Reuses `try_merge_responses` for assembly and the cleanest way to impl that was to actually split that so that `try_merge_responses` returns `None` if we fail to merge them and then add `flounder` which is used afterwards which is allowed to lower the certainty of our responses. If, in the future, we add the ability to merge candidates `YES: ?0 = Vec<u32>` and `YES: ?0 = Vec<i32>` to `AMBIG: ?0 = Vec<?1>`, this should happen in `flounder`. r? `@compiler-errors` `@BoxyUwU`
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.
r? @lcnr since we discussed that: