mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +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::{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()
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user