-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Return nested obligations from canonical response var unification #109493
Return nested obligations from canonical response var unification #109493
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
d2377ca
to
3b3c8c9
Compare
☔ The latest upstream changes (presumably #109503) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after dealing with comment if you want
@@ -81,10 +81,18 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> { | |||
|
|||
if self.tcx.trait_solver_next() { | |||
self.probe(|snapshot| { | |||
if let Ok((_, certainty)) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we already talked about that before, but is there a reason we can't use the FulfillmentContext
and select_where_possible
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't bubble up overflow correctly when using a fulfillment context, but we're actually already using a fulfillment context for the evaluate queries in SelectionCtxt
.... so seems alright for now, I can migrate it to use fulfillment. I'll leave a FIXME.
3b3c8c9
to
1680334
Compare
@bors r=lcnr |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#108629 (rustdoc: add support for type filters in arguments and generics) - rust-lang#108924 (panic_immediate_abort requires abort as a panic strategy) - rust-lang#108961 (Refine error spans for const args in hir typeck) - rust-lang#108986 (sync LVI tests) - rust-lang#109142 (Add block-based mutex unlocking example) - rust-lang#109368 (fix typo in the creation of OpenOption for RustyHermit) - rust-lang#109493 (Return nested obligations from canonical response var unification) - rust-lang#109515 (Add AixLinker to support linking on AIX) - rust-lang#109536 (resolve: Rename some cstore methods to match queries and add comments) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #109547) made this pull request unmergeable. Please resolve the merge conflicts. |
Handle alias-eq obligations being emitted from
instantiate_and_apply_query_response
in:EvalCtxt
- by processing the nested obligations in the next loop bynew_goals
FulfillCtxt
- by adding the nested obligations to the fulfillment's pending obligationsInferCtxt::evaluate_obligation
-by returningsame behavior as above, since we use fulfillment andEvaluationResult::EvaluatedToAmbig
(boo 👎, see the FIXME)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