pub trait SolverDelegate: Deref<Target: InferCtxtLike<Interner = Self::Interner>> + Sized {
type Interner: Interner;
type Span: Copy;
Show 16 methods
// Required methods
fn build_with_canonical<V>(
cx: Self::Interner,
solver_mode: SolverMode,
canonical: &Canonical<Self::Interner, V>,
) -> (Self, V, CanonicalVarValues<Self::Interner>)
where V: TypeFoldable<Self::Interner>;
fn fresh_var_for_kind_with_span(
&self,
arg: <Self::Interner as Interner>::GenericArg,
span: Self::Span,
) -> <Self::Interner as Interner>::GenericArg;
fn leak_check(
&self,
max_input_universe: UniverseIndex,
) -> Result<(), NoSolution>;
fn try_const_eval_resolve(
&self,
param_env: <Self::Interner as Interner>::ParamEnv,
unevaluated: UnevaluatedConst<Self::Interner>,
) -> Option<<Self::Interner as Interner>::Const>;
fn well_formed_goals(
&self,
param_env: <Self::Interner as Interner>::ParamEnv,
arg: <Self::Interner as Interner>::GenericArg,
) -> Option<Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>>;
fn clone_opaque_types_for_query_response(
&self,
) -> Vec<(OpaqueTypeKey<Self::Interner>, <Self::Interner as Interner>::Ty)>;
fn make_deduplicated_outlives_constraints(
&self,
) -> Vec<OutlivesPredicate<Self::Interner, <Self::Interner as Interner>::GenericArg>>;
fn instantiate_canonical<V>(
&self,
canonical: Canonical<Self::Interner, V>,
values: CanonicalVarValues<Self::Interner>,
) -> V
where V: TypeFoldable<Self::Interner>;
fn instantiate_canonical_var_with_infer(
&self,
cv_info: CanonicalVarInfo<Self::Interner>,
universe_map: impl Fn(UniverseIndex) -> UniverseIndex,
) -> <Self::Interner as Interner>::GenericArg;
fn insert_hidden_type(
&self,
opaque_type_key: OpaqueTypeKey<Self::Interner>,
param_env: <Self::Interner as Interner>::ParamEnv,
hidden_ty: <Self::Interner as Interner>::Ty,
goals: &mut Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>,
) -> Result<(), NoSolution>;
fn add_item_bounds_for_hidden_type(
&self,
def_id: <Self::Interner as Interner>::DefId,
args: <Self::Interner as Interner>::GenericArgs,
param_env: <Self::Interner as Interner>::ParamEnv,
hidden_ty: <Self::Interner as Interner>::Ty,
goals: &mut Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>,
);
fn inject_new_hidden_type_unchecked(
&self,
key: OpaqueTypeKey<Self::Interner>,
hidden_ty: <Self::Interner as Interner>::Ty,
);
fn reset_opaque_types(&self);
fn fetch_eligible_assoc_item(
&self,
param_env: <Self::Interner as Interner>::ParamEnv,
goal_trait_ref: TraitRef<Self::Interner>,
trait_assoc_def_id: <Self::Interner as Interner>::DefId,
impl_def_id: <Self::Interner as Interner>::DefId,
) -> Result<Option<<Self::Interner as Interner>::DefId>, NoSolution>;
fn is_transmutable(
&self,
param_env: <Self::Interner as Interner>::ParamEnv,
dst: <Self::Interner as Interner>::Ty,
src: <Self::Interner as Interner>::Ty,
assume: <Self::Interner as Interner>::Const,
) -> Result<Certainty, NoSolution>;
// Provided method
fn cx(&self) -> Self::Interner { ... }
}
Required Associated Types§
Required Methods§
fn build_with_canonical<V>(
cx: Self::Interner,
solver_mode: SolverMode,
canonical: &Canonical<Self::Interner, V>,
) -> (Self, V, CanonicalVarValues<Self::Interner>)where
V: TypeFoldable<Self::Interner>,
fn fresh_var_for_kind_with_span( &self, arg: <Self::Interner as Interner>::GenericArg, span: Self::Span, ) -> <Self::Interner as Interner>::GenericArg
fn leak_check( &self, max_input_universe: UniverseIndex, ) -> Result<(), NoSolution>
fn try_const_eval_resolve( &self, param_env: <Self::Interner as Interner>::ParamEnv, unevaluated: UnevaluatedConst<Self::Interner>, ) -> Option<<Self::Interner as Interner>::Const>
fn well_formed_goals( &self, param_env: <Self::Interner as Interner>::ParamEnv, arg: <Self::Interner as Interner>::GenericArg, ) -> Option<Vec<Goal<Self::Interner, <Self::Interner as Interner>::Predicate>>>
fn clone_opaque_types_for_query_response( &self, ) -> Vec<(OpaqueTypeKey<Self::Interner>, <Self::Interner as Interner>::Ty)>
fn make_deduplicated_outlives_constraints( &self, ) -> Vec<OutlivesPredicate<Self::Interner, <Self::Interner as Interner>::GenericArg>>
fn instantiate_canonical<V>(
&self,
canonical: Canonical<Self::Interner, V>,
values: CanonicalVarValues<Self::Interner>,
) -> Vwhere
V: TypeFoldable<Self::Interner>,
fn instantiate_canonical_var_with_infer( &self, cv_info: CanonicalVarInfo<Self::Interner>, universe_map: impl Fn(UniverseIndex) -> UniverseIndex, ) -> <Self::Interner as Interner>::GenericArg
fn reset_opaque_types(&self)
fn fetch_eligible_assoc_item( &self, param_env: <Self::Interner as Interner>::ParamEnv, goal_trait_ref: TraitRef<Self::Interner>, trait_assoc_def_id: <Self::Interner as Interner>::DefId, impl_def_id: <Self::Interner as Interner>::DefId, ) -> Result<Option<<Self::Interner as Interner>::DefId>, NoSolution>
fn is_transmutable( &self, param_env: <Self::Interner as Interner>::ParamEnv, dst: <Self::Interner as Interner>::Ty, src: <Self::Interner as Interner>::Ty, assume: <Self::Interner as Interner>::Const, ) -> Result<Certainty, NoSolution>
Provided Methods§
Object Safety§
This trait is not object safe.