@@ -13,8 +13,8 @@ use rustc_middle::infer::canonical::CanonicalVarInfos;
1313use rustc_middle:: infer:: unify_key:: { ConstVariableOrigin , ConstVariableOriginKind } ;
1414use rustc_middle:: traits:: solve:: inspect;
1515use rustc_middle:: traits:: solve:: {
16- CanonicalInput , CanonicalResponse , Certainty , IsNormalizesToHack , PredefinedOpaques ,
17- PredefinedOpaquesData , QueryResult ,
16+ CanonicalInput , CanonicalResponse , Certainty , PredefinedOpaques , PredefinedOpaquesData ,
17+ QueryResult ,
1818} ;
1919use rustc_middle:: traits:: specialization_graph;
2020use rustc_middle:: ty:: {
@@ -337,8 +337,15 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
337337 Ok ( ( has_changed, certainty) )
338338 }
339339
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.
342349 fn evaluate_goal_raw (
343350 & mut self ,
344351 goal_evaluation_kind : GoalEvaluationKind ,
@@ -522,7 +529,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
522529 ) ;
523530
524531 let ( NestedNormalizationGoals ( nested_goals) , _, certainty) = self . evaluate_goal_raw (
525- GoalEvaluationKind :: Nested { is_normalizes_to_hack : IsNormalizesToHack :: Yes } ,
532+ GoalEvaluationKind :: Nested ,
526533 GoalSource :: Misc ,
527534 unconstrained_goal,
528535 ) ?;
@@ -557,11 +564,8 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
557564 }
558565
559566 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) ?;
565569 if has_changed {
566570 unchanged_certainty = None ;
567571 }
0 commit comments