@@ -17,7 +17,7 @@ use crate::delegate::SolverDelegate;
17
17
use crate :: solve:: inspect:: { self , ProofTreeBuilder } ;
18
18
use crate :: solve:: search_graph:: SearchGraph ;
19
19
use crate :: solve:: {
20
- CanonicalInput , CanonicalResponse , Certainty , Goal , GoalEvaluationKind , GoalSource , MaybeCause ,
20
+ CanonicalInput , CanonicalResponse , Certainty , Goal , GoalEvaluationKind , GoalSource ,
21
21
NestedNormalizationGoals , NoSolution , PredefinedOpaquesData , QueryResult , SolverMode ,
22
22
FIXPOINT_STEP_LIMIT ,
23
23
} ;
@@ -370,20 +370,19 @@ where
370
370
canonical_goal,
371
371
& mut goal_evaluation,
372
372
) ;
373
- let canonical_response = match canonical_response {
373
+ let response = match canonical_response {
374
374
Err ( e) => {
375
375
self . inspect . goal_evaluation ( goal_evaluation) ;
376
376
return Err ( e) ;
377
377
}
378
378
Ok ( response) => response,
379
379
} ;
380
380
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) ;
387
386
self . inspect . goal_evaluation ( goal_evaluation) ;
388
387
// FIXME: We previously had an assert here that checked that recomputing
389
388
// a goal after applying its constraints did not change its response.
@@ -398,24 +397,6 @@ where
398
397
Ok ( ( normalization_nested_goals, has_changed, certainty) )
399
398
}
400
399
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
-
419
400
fn compute_goal ( & mut self , goal : Goal < I , I :: Predicate > ) -> QueryResult < I > {
420
401
let Goal { param_env, predicate } = goal;
421
402
let kind = predicate. kind ( ) ;
0 commit comments