Skip to content

Commit

Permalink
SolverDelegate add assoc type for Infcx
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Oct 17, 2024
1 parent 06d261d commit c45073e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/rustc_next_trait_solver/src/delegate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Target: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>> + Sized
{
pub trait SolverDelegate: Deref<Target = <Self as SolverDelegate>::Infcx> + Sized {
type Infcx: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>;
type Interner: Interner;
fn cx(&self) -> Self::Interner {
(**self).cx()
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_trait_selection/src/solve/delegate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit c45073e

Please sign in to comment.