about summary refs log tree commit diff
path: root/compiler/rustc_next_trait_solver
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2024-10-22 08:27:11 +0200
committerlcnr <rust@lcnr.de>2024-10-22 08:30:09 +0200
commitd6ce2bd1de944c9c7fbb2a7095a12304e4484935 (patch)
treef8d13479f9dd88e95386bb89fb308bc5f6bc6c4c /compiler/rustc_next_trait_solver
parent25365aeacf32715f2a4cd0d63326139d16e3c7ed (diff)
downloadrust-d6ce2bd1de944c9c7fbb2a7095a12304e4484935.tar.gz
rust-d6ce2bd1de944c9c7fbb2a7095a12304e4484935.zip
remove unused field
Diffstat (limited to 'compiler/rustc_next_trait_solver')
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs2
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/inspect/build.rs16
2 files changed, 7 insertions, 11 deletions
diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs
index cbefc826fb7..250174e033e 100644
--- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs
@@ -291,7 +291,7 @@ where
             search_graph,
             nested_goals: NestedGoals::new(),
             tainted: Ok(()),
-            inspect: canonical_goal_evaluation.new_goal_evaluation_step(var_values, input),
+            inspect: canonical_goal_evaluation.new_goal_evaluation_step(var_values),
         };
 
         for &(key, ty) in &input.predefined_opaques_in_body.opaque_types {
diff --git a/compiler/rustc_next_trait_solver/src/solve/inspect/build.rs b/compiler/rustc_next_trait_solver/src/solve/inspect/build.rs
index 85474bf37b4..1607fbb1b6a 100644
--- a/compiler/rustc_next_trait_solver/src/solve/inspect/build.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/inspect/build.rs
@@ -13,7 +13,7 @@ use rustc_type_ir::{self as ty, Interner};
 use crate::delegate::SolverDelegate;
 use crate::solve::eval_ctxt::canonical;
 use crate::solve::{
-    CanonicalInput, Certainty, GenerateProofTree, Goal, GoalEvaluationKind, GoalSource, QueryInput,
+    CanonicalInput, Certainty, GenerateProofTree, Goal, GoalEvaluationKind, GoalSource,
     QueryResult, inspect,
 };
 
@@ -119,6 +119,9 @@ impl<I: Interner> WipCanonicalGoalEvaluation<I> {
     }
 }
 
+/// This only exists during proof tree building and does not have
+/// a corresponding struct in `inspect`. We need this to track a
+/// bunch of metadata about the current evaluation.
 #[derive_where(PartialEq, Eq, Debug; I: Interner)]
 struct WipCanonicalGoalEvaluationStep<I: Interner> {
     /// Unlike `EvalCtxt::var_values`, we append a new
@@ -128,7 +131,6 @@ struct WipCanonicalGoalEvaluationStep<I: Interner> {
     /// This is necessary as we otherwise don't unify these
     /// vars when instantiating multiple `CanonicalState`.
     var_values: Vec<I::GenericArg>,
-    instantiated_goal: QueryInput<I, I::Predicate>,
     probe_depth: usize,
     evaluation: WipProbe<I>,
 }
@@ -145,16 +147,12 @@ impl<I: Interner> WipCanonicalGoalEvaluationStep<I> {
         current
     }
 
-    fn finalize(self) -> inspect::CanonicalGoalEvaluationStep<I> {
+    fn finalize(self) -> inspect::Probe<I> {
         let evaluation = self.evaluation.finalize();
         match evaluation.kind {
-            inspect::ProbeKind::Root { .. } => (),
+            inspect::ProbeKind::Root { .. } => evaluation,
             _ => unreachable!("unexpected root evaluation: {evaluation:?}"),
         }
-        inspect::CanonicalGoalEvaluationStep {
-            instantiated_goal: self.instantiated_goal,
-            evaluation,
-        }
     }
 }
 
@@ -328,11 +326,9 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> ProofTreeBuilder<D> {
     pub(crate) fn new_goal_evaluation_step(
         &mut self,
         var_values: ty::CanonicalVarValues<I>,
-        instantiated_goal: QueryInput<I, I::Predicate>,
     ) -> ProofTreeBuilder<D> {
         self.nested(|| WipCanonicalGoalEvaluationStep {
             var_values: var_values.var_values.to_vec(),
-            instantiated_goal,
             evaluation: WipProbe {
                 initial_num_var_values: var_values.len(),
                 steps: vec![],