diff --git a/compiler/rustc_next_trait_solver/src/delegate.rs b/compiler/rustc_next_trait_solver/src/delegate.rs index 6a3d58b59066b..9b656579ca5c2 100644 --- a/compiler/rustc_next_trait_solver/src/delegate.rs +++ b/compiler/rustc_next_trait_solver/src/delegate.rs @@ -4,9 +4,8 @@ use rustc_type_ir::fold::TypeFoldable; use rustc_type_ir::solve::{Certainty, Goal, NoSolution, SolverMode}; use rustc_type_ir::{self as ty, InferCtxtLike, Interner}; -pub trait SolverDelegate: - Deref::Interner>> + Sized -{ +pub trait SolverDelegate: Deref::Infcx> + Sized { + type Infcx: InferCtxtLike::Interner>; type Interner: Interner; fn cx(&self) -> Self::Interner { (**self).cx() diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs index df9ac2b80fded..b13965db18b5b 100644 --- a/compiler/rustc_trait_selection/src/solve/delegate.rs +++ b/compiler/rustc_trait_selection/src/solve/delegate.rs @@ -36,6 +36,7 @@ impl<'tcx> Deref for SolverDelegate<'tcx> { } impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<'tcx> { + type Infcx = InferCtxt<'tcx>; type Interner = TyCtxt<'tcx>; fn cx(&self) -> TyCtxt<'tcx> {