Skip to content

Return nested obligations from canonical response var unification#109493

Merged
bors merged 2 commits intorust-lang:masterfrom
compiler-errors:new-solver-vars-obligations
Mar 24, 2023
Merged

Return nested obligations from canonical response var unification#109493
bors merged 2 commits intorust-lang:masterfrom
compiler-errors:new-solver-vars-obligations

Conversation

@compiler-errors
Copy link
Contributor

@compiler-errors compiler-errors commented Mar 22, 2023

Handle alias-eq obligations being emitted from instantiate_and_apply_query_response in:

  • EvalCtxt - by processing the nested obligations in the next loop by new_goals
  • FulfillCtxt - by adding the nested obligations to the fulfillment's pending obligations
  • InferCtxt::evaluate_obligation - by returning EvaluationResult::EvaluatedToAmbig (boo 👎, see the FIXME) same behavior as above, since we use fulfillment and select_where_possible

The only one that's truly sketchy is evaluate_obligation, but it's not hard to modify this behavior moving forward.

From #109037, I think a smaller repro could be crafted if I were smarter, but I am not, so I just took this from #105878.

r? @lcnr cc @BoxyUwU

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants