mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Use new helper inside probe
This commit is contained in:
@@ -587,12 +587,8 @@ fn consider_builtin_discriminant_kind_candidate(
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user