diff options
| author | yifei <lyfmagic99@gmail.com> | 2023-03-08 20:12:46 +0800 |
|---|---|---|
| committer | yifei <lyfmagic99@gmail.com> | 2023-03-08 20:12:46 +0800 |
| commit | 204ba3224ef06f99622fd733cdc14afbc5d83c7e (patch) | |
| tree | 9b0201348b9226c5c962bbd536e08b376850caf2 /compiler | |
| parent | 38b96553112dce3de630890701f17d86e265f6ba (diff) | |
| download | rust-204ba3224ef06f99622fd733cdc14afbc5d83c7e.tar.gz rust-204ba3224ef06f99622fd733cdc14afbc5d83c7e.zip | |
fix: evaluate with wrong obligation stack
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index cd3f3c114ba..48c3b3601b4 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -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)?, ); } } |
