diff options
| author | Wilco Kusee <wilcokusee@gmail.com> | 2023-02-03 10:04:15 +0100 |
|---|---|---|
| committer | Wilco Kusee <wilcokusee@gmail.com> | 2023-02-03 10:04:15 +0100 |
| commit | f29000eba9ebd43dca5ae97bab39148cce9319bc (patch) | |
| tree | 8aa3018dd1e85f4103799e52ee213070ab670ff1 | |
| parent | de50a86a12d6db76e7fec4c8f15e17ae199acb7e (diff) | |
| download | rust-f29000eba9ebd43dca5ae97bab39148cce9319bc.tar.gz rust-f29000eba9ebd43dca5ae97bab39148cce9319bc.zip | |
Use new helper inside probe
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/project_goals.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/project_goals.rs b/compiler/rustc_trait_selection/src/solve/project_goals.rs index 170b560d7b6..9f62f686af6 100644 --- a/compiler/rustc_trait_selection/src/solve/project_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/project_goals.rs @@ -587,12 +587,8 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> { goal: Goal<'tcx, Self>, ) -> QueryResult<'tcx> { let discriminant = goal.predicate.self_ty().discriminant_ty(ecx.tcx()); - let nested_goals = ecx.infcx.eq( - goal.param_env, - goal.predicate.term.ty().expect("expected ty goal"), - discriminant, - )?; - ecx.evaluate_all_and_make_canonical_response(nested_goals) + ecx.infcx + .probe(|_| ecx.eq_term_and_make_canonical_response(goal, Certainty::Yes, discriminant)) } } |
