Filter out universals and lifetimes from stalled_vars

This commit is contained in:
Michael Goulet
2025-06-05 16:36:47 +00:00
parent f315e61458
commit 8addb6f3be
2 changed files with 16 additions and 3 deletions

View File

@@ -120,13 +120,15 @@ pub(super) fn fulfillment_error_for_stalled<'tcx>(
false,
),
Ok(GoalEvaluation { certainty: Certainty::Yes, .. }) => {
bug!(
span_bug!(
root_obligation.cause.span,
"did not expect successful goal when collecting ambiguity errors for `{:?}`",
infcx.resolve_vars_if_possible(root_obligation.predicate),
)
}
Err(_) => {
bug!(
span_bug!(
root_obligation.cause.span,
"did not expect selection error when collecting ambiguity errors for `{:?}`",
infcx.resolve_vars_if_possible(root_obligation.predicate),
)