From 8addb6f3be3cd166bf40919c766cde2efc19fbaa Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 5 Jun 2025 16:36:47 +0000 Subject: Filter out universals and lifetimes from stalled_vars --- compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_trait_selection/src') diff --git a/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs b/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs index 1c9d69da322..36a8ae675c0 100644 --- a/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs +++ b/compiler/rustc_trait_selection/src/solve/fulfill/derive_errors.rs @@ -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), ) -- cgit 1.4.1-3-g733a5