fix: evaluate with wrong obligation stack
This commit is contained in:
parent
38b9655311
commit
204ba3224e
3 changed files with 47 additions and 2 deletions
|
@ -1083,7 +1083,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
let mut nested_result = EvaluationResult::EvaluatedToOk;
|
||||
for obligation in nested_obligations {
|
||||
nested_result = cmp::max(
|
||||
this.evaluate_predicate_recursively(stack.list(), obligation)?,
|
||||
this.evaluate_predicate_recursively(previous_stack, obligation)?,
|
||||
nested_result,
|
||||
);
|
||||
}
|
||||
|
@ -1092,7 +1092,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
let obligation = obligation.with(this.tcx(), predicate);
|
||||
result = cmp::max(
|
||||
nested_result,
|
||||
this.evaluate_trait_predicate_recursively(stack.list(), obligation)?,
|
||||
this.evaluate_trait_predicate_recursively(previous_stack, obligation)?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue