@@ -13,8 +13,8 @@ use rustc_middle::infer::canonical::CanonicalVarInfos;
13
13
use rustc_middle:: infer:: unify_key:: { ConstVariableOrigin , ConstVariableOriginKind } ;
14
14
use rustc_middle:: traits:: solve:: inspect;
15
15
use rustc_middle:: traits:: solve:: {
16
- CanonicalInput , CanonicalResponse , Certainty , IsNormalizesToHack , PredefinedOpaques ,
17
- PredefinedOpaquesData , QueryResult ,
16
+ CanonicalInput , CanonicalResponse , Certainty , PredefinedOpaques , PredefinedOpaquesData ,
17
+ QueryResult ,
18
18
} ;
19
19
use rustc_middle:: traits:: specialization_graph;
20
20
use rustc_middle:: ty:: {
@@ -337,8 +337,15 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
337
337
Ok ( ( has_changed, certainty) )
338
338
}
339
339
340
- /// FIXME(-Znext-solver=coinduction): `_source` is currently unused but will
341
- /// be necessary once we implement the new coinduction approach.
340
+ /// Recursively evaluates `goal`, returning the nested goals in case
341
+ /// the nested goal is a `NormalizesTo` goal.
342
+ ///
343
+ /// As all other goal kinds do not return any nested goals and
344
+ /// `NormalizesTo` is only used by `AliasRelate`, all other callsites
345
+ /// should use [`EvalCtxt::evaluate_goal`] which discards that empty
346
+ /// storage.
347
+ // FIXME(-Znext-solver=coinduction): `_source` is currently unused but will
348
+ // be necessary once we implement the new coinduction approach.
342
349
fn evaluate_goal_raw (
343
350
& mut self ,
344
351
goal_evaluation_kind : GoalEvaluationKind ,
@@ -522,7 +529,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
522
529
) ;
523
530
524
531
let ( NestedNormalizationGoals ( nested_goals) , _, certainty) = self . evaluate_goal_raw (
525
- GoalEvaluationKind :: Nested { is_normalizes_to_hack : IsNormalizesToHack :: Yes } ,
532
+ GoalEvaluationKind :: Nested ,
526
533
GoalSource :: Misc ,
527
534
unconstrained_goal,
528
535
) ?;
@@ -557,11 +564,8 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
557
564
}
558
565
559
566
for ( source, goal) in goals. goals {
560
- let ( has_changed, certainty) = self . evaluate_goal (
561
- GoalEvaluationKind :: Nested { is_normalizes_to_hack : IsNormalizesToHack :: No } ,
562
- source,
563
- goal,
564
- ) ?;
567
+ let ( has_changed, certainty) =
568
+ self . evaluate_goal ( GoalEvaluationKind :: Nested , source, goal) ?;
565
569
if has_changed {
566
570
unchanged_certainty = None ;
567
571
}
0 commit comments