Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,8 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
)
}

type ProbeRef = &'tcx inspect::Probe<TyCtxt<'tcx>>;
fn mk_probe_ref(self, probe: inspect::Probe<Self>) -> &'tcx inspect::Probe<TyCtxt<'tcx>> {
type Probe = &'tcx inspect::Probe<TyCtxt<'tcx>>;
fn mk_probe(self, probe: inspect::Probe<Self>) -> &'tcx inspect::Probe<TyCtxt<'tcx>> {
self.arena.alloc(probe)
}
fn evaluate_root_goal_for_proof_tree_raw(
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ pub fn evaluate_root_goal_for_proof_tree_raw_provider<
>(
cx: I,
canonical_goal: CanonicalInput<I>,
) -> (QueryResult<I>, I::ProbeRef) {
) -> (QueryResult<I>, I::Probe) {
let mut inspect = inspect::ProofTreeBuilder::new();
let canonical_result = SearchGraph::<D>::evaluate_root_goal_for_proof_tree(
cx,
Expand All @@ -1284,7 +1284,7 @@ pub fn evaluate_root_goal_for_proof_tree_raw_provider<
&mut inspect,
);
let final_revision = inspect.unwrap();
(canonical_result, cx.mk_probe_ref(final_revision))
(canonical_result, cx.mk_probe(final_revision))
}

/// Evaluate a goal to build a proof tree.
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc_type_ir/src/interner.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::borrow::Borrow;
use std::fmt::Debug;
use std::hash::Hash;
use std::ops::Deref;
Expand Down Expand Up @@ -383,12 +384,12 @@ pub trait Interner:
defining_anchor: Self::LocalDefId,
) -> Self::LocalDefIds;

type ProbeRef: Copy + Debug + Hash + Eq + Deref<Target = inspect::Probe<Self>>;
fn mk_probe_ref(self, probe: inspect::Probe<Self>) -> Self::ProbeRef;
type Probe: Debug + Hash + Eq + Borrow<inspect::Probe<Self>>;
fn mk_probe(self, probe: inspect::Probe<Self>) -> Self::Probe;
fn evaluate_root_goal_for_proof_tree_raw(
self,
canonical_goal: CanonicalInput<Self>,
) -> (QueryResult<Self>, Self::ProbeRef);
) -> (QueryResult<Self>, Self::Probe);
}

/// Imagine you have a function `F: FnOnce(&[T]) -> R`, plus an iterator `iter`
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_type_ir/src/solve/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub type CanonicalState<I, T> = Canonical<I, State<I, T>>;
pub struct GoalEvaluation<I: Interner> {
pub uncanonicalized_goal: Goal<I, I::Predicate>,
pub orig_values: Vec<I::GenericArg>,
pub final_revision: I::ProbeRef,
pub final_revision: I::Probe,
pub result: QueryResult<I>,
}

Expand Down
Loading