Fast path for processing some obligations in the new solver
This commit is contained in:
@@ -3,6 +3,8 @@ use std::ops::Deref;
|
||||
use rustc_type_ir::solve::{Certainty, Goal, NoSolution};
|
||||
use rustc_type_ir::{self as ty, InferCtxtLike, Interner, TypeFoldable};
|
||||
|
||||
use crate::solve::HasChanged;
|
||||
|
||||
pub trait SolverDelegate: Deref<Target = Self::Infcx> + Sized {
|
||||
type Infcx: InferCtxtLike<Interner = Self::Interner>;
|
||||
type Interner: Interner;
|
||||
@@ -17,6 +19,12 @@ pub trait SolverDelegate: Deref<Target = Self::Infcx> + Sized {
|
||||
where
|
||||
V: TypeFoldable<Self::Interner>;
|
||||
|
||||
fn compute_goal_fast_path(
|
||||
&self,
|
||||
goal: Goal<Self::Interner, <Self::Interner as Interner>::Predicate>,
|
||||
span: <Self::Interner as Interner>::Span,
|
||||
) -> Option<HasChanged>;
|
||||
|
||||
fn fresh_var_for_kind_with_span(
|
||||
&self,
|
||||
arg: <Self::Interner as Interner>::GenericArg,
|
||||
|
||||
Reference in New Issue
Block a user