mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 11:37:39 +00:00
SolverDelegate add assoc type for Infcx
This commit is contained in:
parent
06d261daf6
commit
c45073ec3e
@ -4,9 +4,8 @@ use rustc_type_ir::fold::TypeFoldable;
|
|||||||
use rustc_type_ir::solve::{Certainty, Goal, NoSolution, SolverMode};
|
use rustc_type_ir::solve::{Certainty, Goal, NoSolution, SolverMode};
|
||||||
use rustc_type_ir::{self as ty, InferCtxtLike, Interner};
|
use rustc_type_ir::{self as ty, InferCtxtLike, Interner};
|
||||||
|
|
||||||
pub trait SolverDelegate:
|
pub trait SolverDelegate: Deref<Target = <Self as SolverDelegate>::Infcx> + Sized {
|
||||||
Deref<Target: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>> + Sized
|
type Infcx: InferCtxtLike<Interner = <Self as SolverDelegate>::Interner>;
|
||||||
{
|
|
||||||
type Interner: Interner;
|
type Interner: Interner;
|
||||||
fn cx(&self) -> Self::Interner {
|
fn cx(&self) -> Self::Interner {
|
||||||
(**self).cx()
|
(**self).cx()
|
||||||
|
@ -36,6 +36,7 @@ impl<'tcx> Deref for SolverDelegate<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<'tcx> {
|
impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<'tcx> {
|
||||||
|
type Infcx = InferCtxt<'tcx>;
|
||||||
type Interner = TyCtxt<'tcx>;
|
type Interner = TyCtxt<'tcx>;
|
||||||
|
|
||||||
fn cx(&self) -> TyCtxt<'tcx> {
|
fn cx(&self) -> TyCtxt<'tcx> {
|
||||||
|
Loading…
Reference in New Issue
Block a user