Record certainty before evaluating nesteds, so we make candidates

This commit is contained in:
Michael Goulet 2024-05-01 16:03:08 -04:00
parent 79734f1db8
commit 837bde11a2

View file

@ -90,6 +90,8 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
&mut self,
certainty: Certainty,
) -> QueryResult<'tcx> {
self.inspect.make_canonical_response(certainty);
let goals_certainty = self.try_evaluate_added_goals()?;
assert_eq!(
self.tainted,
@ -98,8 +100,6 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
previous call to `try_evaluate_added_goals!`"
);
self.inspect.make_canonical_response(certainty);
// When normalizing, we've replaced the expected term with an unconstrained
// inference variable. This means that we dropped information which could
// have been important. We handle this by instead returning the nested goals