@@ -17,7 +17,7 @@ use crate::delegate::SolverDelegate;
1717use crate :: solve:: inspect:: { self , ProofTreeBuilder } ;
1818use crate :: solve:: search_graph:: SearchGraph ;
1919use crate :: solve:: {
20- CanonicalInput , CanonicalResponse , Certainty , Goal , GoalEvaluationKind , GoalSource , MaybeCause ,
20+ CanonicalInput , CanonicalResponse , Certainty , Goal , GoalEvaluationKind , GoalSource ,
2121 NestedNormalizationGoals , NoSolution , PredefinedOpaquesData , QueryResult , SolverMode ,
2222 FIXPOINT_STEP_LIMIT ,
2323} ;
@@ -370,20 +370,19 @@ where
370370 canonical_goal,
371371 & mut goal_evaluation,
372372 ) ;
373- let canonical_response = match canonical_response {
373+ let response = match canonical_response {
374374 Err ( e) => {
375375 self . inspect . goal_evaluation ( goal_evaluation) ;
376376 return Err ( e) ;
377377 }
378378 Ok ( response) => response,
379379 } ;
380380
381- let ( normalization_nested_goals, certainty, has_changed) = self
382- . instantiate_response_discarding_overflow (
383- goal. param_env ,
384- orig_values,
385- canonical_response,
386- ) ;
381+ let has_changed = !response. value . var_values . is_identity_modulo_regions ( )
382+ || !response. value . external_constraints . opaque_types . is_empty ( ) ;
383+
384+ let ( normalization_nested_goals, certainty) =
385+ self . instantiate_and_apply_query_response ( goal. param_env , orig_values, response) ;
387386 self . inspect . goal_evaluation ( goal_evaluation) ;
388387 // FIXME: We previously had an assert here that checked that recomputing
389388 // a goal after applying its constraints did not change its response.
@@ -398,24 +397,6 @@ where
398397 Ok ( ( normalization_nested_goals, has_changed, certainty) )
399398 }
400399
401- fn instantiate_response_discarding_overflow (
402- & mut self ,
403- param_env : I :: ParamEnv ,
404- original_values : Vec < I :: GenericArg > ,
405- response : CanonicalResponse < I > ,
406- ) -> ( NestedNormalizationGoals < I > , Certainty , bool ) {
407- if let Certainty :: Maybe ( MaybeCause :: Overflow { .. } ) = response. value . certainty {
408- return ( NestedNormalizationGoals :: empty ( ) , response. value . certainty , false ) ;
409- }
410-
411- let has_changed = !response. value . var_values . is_identity_modulo_regions ( )
412- || !response. value . external_constraints . opaque_types . is_empty ( ) ;
413-
414- let ( normalization_nested_goals, certainty) =
415- self . instantiate_and_apply_query_response ( param_env, original_values, response) ;
416- ( normalization_nested_goals, certainty, has_changed)
417- }
418-
419400 fn compute_goal ( & mut self , goal : Goal < I , I :: Predicate > ) -> QueryResult < I > {
420401 let Goal { param_env, predicate } = goal;
421402 let kind = predicate. kind ( ) ;
0 commit comments