1
Fork 0

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