about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2023-03-17 14:04:39 +0000
committerBoxy <supbscripter@gmail.com>2023-03-17 14:04:39 +0000
commite06c62cd5bd84e109f8fe409102c446f53b7f4c9 (patch)
tree43df5b5ebc971332b991f2566f8f98a743a8d207 /compiler/rustc_trait_selection/src/solve
parentce14a1eba0a9dd4c4bc5394ee53a8d1756796a9e (diff)
downloadrust-e06c62cd5bd84e109f8fe409102c446f53b7f4c9.tar.gz
rust-e06c62cd5bd84e109f8fe409102c446f53b7f4c9.zip
UNACEPTABLE
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
-rw-r--r--compiler/rustc_trait_selection/src/solve/eval_ctxt.rs6
-rw-r--r--compiler/rustc_trait_selection/src/solve/mod.rs10
-rw-r--r--compiler/rustc_trait_selection/src/solve/project_goals.rs2
3 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
index be138e0ab54..80828d5c1d5 100644
--- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
+++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
@@ -43,17 +43,17 @@ pub(super) enum IsNormalizesToHack {
 
 #[derive(Debug, Clone)]
 pub(super) struct NestedGoals<'tcx> {
-    pub(super) projection_eq_hack_goal: Option<Goal<'tcx, ty::ProjectionPredicate<'tcx>>>,
+    pub(super) normalizes_to_hack_goal: Option<Goal<'tcx, ty::ProjectionPredicate<'tcx>>>,
     pub(super) goals: Vec<Goal<'tcx, ty::Predicate<'tcx>>>,
 }
 
 impl NestedGoals<'_> {
     pub(super) fn new() -> Self {
-        Self { projection_eq_hack_goal: None, goals: Vec::new() }
+        Self { normalizes_to_hack_goal: None, goals: Vec::new() }
     }
 
     pub(super) fn is_empty(&self) -> bool {
-        self.projection_eq_hack_goal.is_none() && self.goals.is_empty()
+        self.normalizes_to_hack_goal.is_none() && self.goals.is_empty()
     }
 }
 
diff --git a/compiler/rustc_trait_selection/src/solve/mod.rs b/compiler/rustc_trait_selection/src/solve/mod.rs
index ba68ff1c2e3..13d6602b7e1 100644
--- a/compiler/rustc_trait_selection/src/solve/mod.rs
+++ b/compiler/rustc_trait_selection/src/solve/mod.rs
@@ -406,12 +406,12 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
 
 impl<'tcx> EvalCtxt<'_, 'tcx> {
     #[instrument(level = "debug", skip(self))]
-    fn set_projection_eq_hack_goal(&mut self, goal: Goal<'tcx, ty::ProjectionPredicate<'tcx>>) {
+    fn set_normalizes_to_hack_goal(&mut self, goal: Goal<'tcx, ty::ProjectionPredicate<'tcx>>) {
         assert!(
-            self.nested_goals.projection_eq_hack_goal.is_none(),
+            self.nested_goals.normalizes_to_hack_goal.is_none(),
             "attempted to set the projection eq hack goal when one already exists"
         );
-        self.nested_goals.projection_eq_hack_goal = Some(goal);
+        self.nested_goals.normalizes_to_hack_goal = Some(goal);
     }
 
     #[instrument(level = "debug", skip(self))]
@@ -438,7 +438,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
             |this| {
                 let mut has_changed = Err(Certainty::Yes);
 
-                if let Some(goal) = goals.projection_eq_hack_goal.take() {
+                if let Some(goal) = goals.normalizes_to_hack_goal.take() {
                     let (_, certainty) = match this.evaluate_goal(
                         IsNormalizesToHack::Yes,
                         goal.with(this.tcx(), ty::Binder::dummy(goal.predicate)),
@@ -475,7 +475,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
                                 term,
                                 projection_ty: goal.predicate.projection_ty,
                             };
-                            new_goals.projection_eq_hack_goal =
+                            new_goals.normalizes_to_hack_goal =
                                 Some(goal.with(this.tcx(), projection_pred));
 
                             has_changed = has_changed.map_err(|c| c.unify_and(certainty));
diff --git a/compiler/rustc_trait_selection/src/solve/project_goals.rs b/compiler/rustc_trait_selection/src/solve/project_goals.rs
index b054a2bda1f..93d77c39f95 100644
--- a/compiler/rustc_trait_selection/src/solve/project_goals.rs
+++ b/compiler/rustc_trait_selection/src/solve/project_goals.rs
@@ -43,7 +43,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
                 term: unconstrained_rhs,
             };
 
-            self.set_projection_eq_hack_goal(goal.with(self.tcx(), unconstrained_predicate));
+            self.set_normalizes_to_hack_goal(goal.with(self.tcx(), unconstrained_predicate));
             self.try_evaluate_added_goals()?;
             self.eq(goal.param_env, unconstrained_rhs, predicate.term)?;
             self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)